Skip to content

Commit

Permalink
Merge pull request #720 from SSWConsulting/fix-send-email-alert-modal
Browse files Browse the repository at this point in the history
Hide title if there is no alert email on the list
  • Loading branch information
zacharykeeping authored Oct 20, 2023
2 parents 54fef5d + 05368d7 commit 6e79c39
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions ui/src/components/misccomponents/SendAlertModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,24 @@
<div class="text-red-700 font-sans">Invalid email input</div>
{/if}
</div>
<div class="font-sans font-bold mt-5">
Currently receiving alerts:
</div>
{#each sharedEmailAddresses as item}
<li
class="cursor-pointer"
on:mouseover={() => {item = { ...item, showDeleteIcon: true } }}
on:focus={() => {item = { ...item, showDeleteIcon: true } }}
on:mouseleave={()=> {item = { ...item, showDeleteIcon: false } }}
>
{item.emailAddress}
{#if item.showDeleteIcon}
<i class="fas fa-trash-can fa-sm text-red-600 ml-1 cursor-pointer" on:click={() => removeAlertEmail(item)} on:keydown={undefined}/>
{/if}
</li>
{/each}
{#if sharedEmailAddresses.length > 0}
<div class="font-sans font-bold mt-5">
Currently receiving alerts:
</div>
{#each sharedEmailAddresses as item}
<li
class="cursor-pointer"
on:mouseover={() => {item = { ...item, showDeleteIcon: true } }}
on:focus={() => {item = { ...item, showDeleteIcon: true } }}
on:mouseleave={()=> {item = { ...item, showDeleteIcon: false } }}
>
{item.emailAddress}
{#if item.showDeleteIcon}
<i class="fas fa-trash-can fa-sm text-red-600 ml-1 cursor-pointer" on:click={() => removeAlertEmail(item)} on:keydown={undefined}/>
{/if}
</li>
{/each}
{/if}
</div>
{/if}
<!--Footer-->
Expand Down

0 comments on commit 6e79c39

Please sign in to comment.