From 05368d7f7a9f61be960b31333c9412669deae182 Mon Sep 17 00:00:00 2001 From: tombui99 Date: Fri, 20 Oct 2023 16:50:28 +1100 Subject: [PATCH] Hide title if there is no alert email on the list --- .../misccomponents/SendAlertModal.svelte | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ui/src/components/misccomponents/SendAlertModal.svelte b/ui/src/components/misccomponents/SendAlertModal.svelte index 1b185447..21ad1f09 100644 --- a/ui/src/components/misccomponents/SendAlertModal.svelte +++ b/ui/src/components/misccomponents/SendAlertModal.svelte @@ -123,22 +123,24 @@
Invalid email input
{/if} -
- Currently receiving alerts: -
- {#each sharedEmailAddresses as item} -
  • {item = { ...item, showDeleteIcon: true } }} - on:focus={() => {item = { ...item, showDeleteIcon: true } }} - on:mouseleave={()=> {item = { ...item, showDeleteIcon: false } }} - > - {item.emailAddress} - {#if item.showDeleteIcon} - removeAlertEmail(item)} on:keydown={undefined}/> - {/if} -
  • - {/each} + {#if sharedEmailAddresses.length > 0} +
    + Currently receiving alerts: +
    + {#each sharedEmailAddresses as item} +
  • {item = { ...item, showDeleteIcon: true } }} + on:focus={() => {item = { ...item, showDeleteIcon: true } }} + on:mouseleave={()=> {item = { ...item, showDeleteIcon: false } }} + > + {item.emailAddress} + {#if item.showDeleteIcon} + removeAlertEmail(item)} on:keydown={undefined}/> + {/if} +
  • + {/each} + {/if} {/if}