diff --git a/src/components/auth/backup/Backup.svelte b/src/components/auth/backup/Backup.svelte index 6633f1f..5bd2ea9 100644 --- a/src/components/auth/backup/Backup.svelte +++ b/src/components/auth/backup/Backup.svelte @@ -24,8 +24,8 @@

- We highly recommend backing up your account on at least one additional - device. + We highly recommend connecting your account on at least one more device, + so that you have a backup.

- + {#if !backupCreated} + + {/if} @@ -134,17 +164,17 @@ @@ -154,10 +184,10 @@ Approve the connection diff --git a/src/components/auth/link/LinkDevice.svelte b/src/components/auth/link/LinkDevice.svelte index 95c60f5..1b436dc 100644 --- a/src/components/auth/link/LinkDevice.svelte +++ b/src/components/auth/link/LinkDevice.svelte @@ -1,10 +1,14 @@ @@ -62,7 +77,7 @@ > {#if displayPin} {displayPin} @@ -78,7 +93,10 @@
-
diff --git a/src/components/notifications/Notification.svelte b/src/components/notifications/Notification.svelte index bec67b8..841d912 100644 --- a/src/components/notifications/Notification.svelte +++ b/src/components/notifications/Notification.svelte @@ -1,13 +1,10 @@ @@ -19,11 +16,7 @@ aria-live="assertive" aria-atomic="true" > -
+
{#if notification.type === 'success'} {#if $notificationStore.length} -
+
{#each $notificationStore as notification (notification.id)}
diff --git a/src/lib/notifications.ts b/src/lib/notifications.ts index 008974f..6a5c0ee 100644 --- a/src/lib/notifications.ts +++ b/src/lib/notifications.ts @@ -4,10 +4,12 @@ import { uuid } from '$lib/common/utils' export type Notification = { id?: string msg?: string - type?: string + type?: NotificationType timeout?: number } +type NotificationType = 'success' | 'error' | 'info' | 'warning' + export const removeNotification: (id: string) => void = id => { notificationStore.update(all => all.filter(notification => notification.id !== id) @@ -16,7 +18,7 @@ export const removeNotification: (id: string) => void = id => { export const addNotification: ( msg: string, - type?: string, + type?: NotificationType, timeout?: number ) => void = (msg, type = 'info', timeout = 5000) => { // uuid for each notification