From 533bcae828aa9cd92878eb776cfbb52a72c106a9 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Fri, 20 Sep 2024 19:18:36 +0530 Subject: [PATCH] ui fixes and improvements. --- src/lib/components/bottomModalAlert.svelte | 229 ++++++++++----------- 1 file changed, 114 insertions(+), 115 deletions(-) diff --git a/src/lib/components/bottomModalAlert.svelte b/src/lib/components/bottomModalAlert.svelte index 6de328e2b..49c1b7d19 100644 --- a/src/lib/components/bottomModalAlert.svelte +++ b/src/lib/components/bottomModalAlert.svelte @@ -21,6 +21,12 @@ dismissBottomModalAlert(modalAlert.id); hideNotification(modalAlert.id); if (modalAlert.closed) modalAlert.closed(); + + if (currentIndex === filteredModalAlerts.length - 1 && filteredModalAlerts.length > 1) { + currentIndex = currentIndex - 1; + } else { + currentIndex = currentIndex % filteredModalAlerts.length; + } } function showNext() { @@ -32,32 +38,59 @@ } -{#if filteredModalAlerts.length > 0} -
-
- {#if currentModalAlert} +{#if filteredModalAlerts.length > 0 && currentModalAlert} +
+
+
{#key currentModalAlert.id} -
-
- +
+ {currentModalAlert.title} - {currentModalAlert.title} +
+
{#if filteredModalAlerts.length > 1} - - Feature {currentIndex + 1} of {filteredModalAlerts.length} - +
+ + Feature {currentIndex + 1} of {filteredModalAlerts.length} + + +
+
+
{/if}
@@ -72,134 +105,85 @@
-
-
+
+ + + {#if currentModalAlert.learnMore && currentModalAlert.learnMore.link} - - {#if currentModalAlert.learnMore && currentModalAlert.learnMore.link} - - {/if} -
- -
-
+ {/if}
{/key} - {/if} -
+
+
{/if}