From 36079a4309b5628c7a253264aed1da41b149841b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 26 Feb 2026 14:08:26 -0800 Subject: ui tweaks --- src/app.html | 6 ++++++ src/components/Account.svelte | 12 ++++++------ src/components/AppHeader.svelte | 16 +++++++++++----- .../(app)/[username]/(profile)/+layout.svelte | 2 +- src/routes/(app)/[username]/(profile)/+page.svelte | 22 +++++++++++----------- src/routes/+layout.svelte | 5 ++++- 6 files changed, 39 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/app.html b/src/app.html index e3206d6f..e82ad055 100644 --- a/src/app.html +++ b/src/app.html @@ -15,6 +15,12 @@ %sveltekit.head% +
%sveltekit.body%
diff --git a/src/components/Account.svelte b/src/components/Account.svelte index 2ea7c9c0..ab788eb2 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -175,7 +175,7 @@
(e.key === "Enter" || e.key === " ") && goPayments(e)} > -
+
{displayName}
{#if $importing.has(id)} @@ -198,7 +198,7 @@ {/if} {/if}
-
+ @@ -237,14 +237,14 @@ setAccount(e, "/send")}>
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte index ca196cdf..27698a77 100644 --- a/src/components/AppHeader.svelte +++ b/src/components/AppHeader.svelte @@ -21,12 +21,18 @@ : undefined, ); + let isHome = $derived($page.url.pathname === `/${user?.username}`); + const links = $derived([ - { - href: `/${user?.username}`, - icon: "ph:house-bold", - label: "Home", - }, + ...(!isHome + ? [ + { + href: `/${user?.username}`, + icon: "ph:house-bold", + label: "Home", + }, + ] + : []), // { // href: `/scan`, // icon: "ph:camera-bold", diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index 39aca251..168be9b2 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -234,7 +234,7 @@
-
+
{@render children?.()}
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index 7f6f4036..50048e15 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -107,7 +107,7 @@ {/if} {#if user?.id && user.id === subject.id} -
+
{#each accounts as account} {/each} @@ -119,18 +119,18 @@ {$t("accounts.addAccount")} {/if} -
- {#if locked} -
{$t("incident")}
- {/if} + {#if locked} +
{$t("incident")}
+ {/if} - {#if $installPrompt} - - {/if} + {#if $installPrompt} + + {/if} +
{/if}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index f1091c2f..c68934b2 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -40,7 +40,10 @@ onMount(() => { if (!browser) return; - // Handle install prompt + // Pick up install prompt captured early in app.html + if (window.__installPrompt) { + $installPrompt = window.__installPrompt; + } window.addEventListener("beforeinstallprompt", (event) => { event.preventDefault(); $installPrompt = event; -- cgit v1.2.3