diff options
| author | Adam Soltys <[email protected]> | 2026-09-29 15:07:41 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-29 15:07:41 -0700 |
| commit | 1213ac7a1f5f4f50f742aadebf970e37c186a234 (patch) | |
| tree | 82e2565d26ca45d40586a7b827c15fbc1d2a8816 /src/components | |
| parent | 64f510692cd53873cf9a95ac0a2bcd00a6a0e6be (diff) | |
| download | coinos-ui-1213ac7a1f5f4f50f742aadebf970e37c186a234.tar.gz coinos-ui-1213ac7a1f5f4f50f742aadebf970e37c186a234.zip | |
Add a dismissable banner pointing to v3.coinos.iov1.0.10
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/V3Banner.svelte | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/components/V3Banner.svelte b/src/components/V3Banner.svelte new file mode 100644 index 00000000..bdc2c4e5 --- /dev/null +++ b/src/components/V3Banner.svelte @@ -0,0 +1,35 @@ +<script> + import { onMount } from "svelte"; + import { t } from "$lib/translations"; + + const key = "v3BannerDismissed"; + let show = $state(false); + + onMount(() => { + try { + show = !localStorage.getItem(key); + } catch (e) { + show = true; + } + }); + + let dismiss = () => { + show = false; + try { + localStorage.setItem(key, "1"); + } catch (e) {} + }; +</script> + +{#if show} + <div + class="flex items-center justify-center gap-2 bg-accent text-accent-content px-4 py-2 text-sm" + > + <a href="https://v3.coinos.io" class="flex-1 text-center font-semibold"> + {$t("v3Banner")} + </a> + <button onclick={dismiss} class="flex" aria-label={$t("dismiss")}> + <iconify-icon noobserver icon="ph:x-bold" width="20"></iconify-icon> + </button> + </div> +{/if} |
