aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/V3Banner.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-29 15:07:41 -0700
committerAdam Soltys <[email protected]>2026-09-29 15:07:41 -0700
commit1213ac7a1f5f4f50f742aadebf970e37c186a234 (patch)
tree82e2565d26ca45d40586a7b827c15fbc1d2a8816 /src/components/V3Banner.svelte
parent64f510692cd53873cf9a95ac0a2bcd00a6a0e6be (diff)
downloadcoinos-ui-1.0.10.tar.gz
coinos-ui-1.0.10.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/V3Banner.svelte')
-rw-r--r--src/components/V3Banner.svelte35
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}