aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-01-09 23:48:45 -0800
committerAdam Soltys <[email protected]>2025-01-09 23:48:45 -0800
commit5aa3fb2818ab30163f53832f6ffcebf859d34d2a (patch)
tree1ec4f0d543669fc64a60720c5c16e1fd04d833ce /src/routes
parent8588de25f16486b56ef0ad533013bd8cb48ff120 (diff)
downloadcoinos-ui-5aa3fb2818ab30163f53832f6ffcebf859d34d2a.tar.gz
coinos-ui-5aa3fb2818ab30163f53832f6ffcebf859d34d2a.zip
only show extension sync if available
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/settings/nostr/+page.svelte13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/routes/(app)/settings/nostr/+page.svelte b/src/routes/(app)/settings/nostr/+page.svelte
index cfcfaf39..7f00309b 100644
--- a/src/routes/(app)/settings/nostr/+page.svelte
+++ b/src/routes/(app)/settings/nostr/+page.svelte
@@ -13,6 +13,7 @@
let { data } = $props();
let { challenge, user } = $derived(data);
let { npub } = $state(user);
+ let extensionAvailable = $derived(browser && window.nostr);
let newNsec = $state(),
nsec = $state(),
@@ -103,11 +104,13 @@
</div>
</div>
- <button class="btn" type="button" onclick={getPubkey}>
- <iconify-icon icon="lucide-lab:bee" width="32" class="text-yellow-400"
- ></iconify-icon>
- {$t("user.settings.syncWithExtension")}</button
- >
+ {#if extensionAvailable}
+ <button class="btn" type="button" onclick={getPubkey}>
+ <iconify-icon icon="lucide-lab:bee" width="32" class="text-yellow-400"
+ ></iconify-icon>
+ {$t("user.settings.syncWithExtension")}</button
+ >
+ {/if}
</div>
{#if user.nsec}