diff options
Diffstat (limited to 'apps/kit/src/lib/components/alert.svelte')
| -rw-r--r-- | apps/kit/src/lib/components/alert.svelte | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/kit/src/lib/components/alert.svelte b/apps/kit/src/lib/components/alert.svelte index 31e7357..fd57105 100644 --- a/apps/kit/src/lib/components/alert.svelte +++ b/apps/kit/src/lib/components/alert.svelte @@ -2,6 +2,7 @@ import { random_string } from "$lib/helpers"; import { createEventDispatcher } from "svelte"; import { onMount } from "svelte"; + import pwKey from "$actions/pwKey"; import { Temporal } from "temporal-polyfill"; import { ExclamationTriangleIcon, CheckCircleIcon, InformationCircleIcon, XCircleIcon, XMarkIcon } from "./icons"; @@ -61,10 +62,12 @@ $: cooldownEnabled = id.indexOf(noCooldownSetting) === -1 && closeable && (closeableCooldown === "~" || parseInt(closeableCooldown) > 0); /** - * Sets this alerts visibility state, when this is false it is removed from the dom using svelte a {#if} block. + * Sets this alerts visibility state, when this is false it is removed from the dom using an {#if} block. */ export let visible = closeableCooldown === "~" || parseInt(closeableCooldown) > 0 ? false : true; + export let _pwKey: string | undefined = undefined; + const cooldownStorageKey = "lastseen--" + id; $: switch (type) { @@ -160,7 +163,7 @@ </script> {#if visible} - <div class="rounded-md bg-{colorClassPart}-50 p-4 {$$restProps.class ?? ''}"> + <div class="rounded-md bg-{colorClassPart}-50 p-4 {$$restProps.class ?? ''}" use:pwKey={_pwKey}> <div class="flex"> <div class="flex-shrink-0"> <svelte:component this={iconComponent} class="text-{colorClassPart}-400" /> |
