diff options
| author | Adam Soltys <[email protected]> | 2026-03-03 14:49:16 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-03 14:49:16 -0800 |
| commit | 1109581ac894bc7f872c53989d1aecde7cfa229f (patch) | |
| tree | 415b76b641a5036679a7acbb85d10103775cad4e /src/components | |
| parent | 6624b19b1d954dc69afbf1a9f6072e791771aff5 (diff) | |
| download | coinos-ui-1109581ac894bc7f872c53989d1aecde7cfa229f.tar.gz coinos-ui-1109581ac894bc7f872c53989d1aecde7cfa229f.zip | |
preload
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Account.svelte | 6 | ||||
| -rw-r--r-- | src/components/AppHeader.svelte | 2 | ||||
| -rw-r--r-- | src/components/Avatar.svelte | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte index 8388a9a7..44b53bdf 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -86,6 +86,8 @@ } }; + let receiveUrl = $derived(id === user.id ? `/${user.username}/receive` : "/invoice"); + let displayType = $derived( accountType === "ark" ? $t("accounts.ark") @@ -163,14 +165,14 @@ </div> <div class="flex w-full text-xl gap-2"> - <a href={"/invoice"} class="contents" onclick={(e) => setAccount(e, "/invoice")}> + <a href={receiveUrl} class="contents" data-sveltekit-preload-data="tap" onclick={(e) => setAccount(e, receiveUrl)}> <button class="btn !w-auto flex-1" data-testid="account-receive"> <PhHandCoinsBold width="32" style="transform: scaleX(-1)" /> <div class="my-auto">{$t("user.dashboard.receive")}</div> </button> </a> - <a href={`/send`} class="contents" onclick={(e) => setAccount(e, "/send")}> + <a href={`/send`} class="contents" data-sveltekit-preload-data="tap" onclick={(e) => setAccount(e, "/send")}> <button type="button" class="btn !w-auto flex-1"> <PhPaperPlaneRightBold width="32" /> <div class="my-auto">{$t("user.dashboard.send")}</div> diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte index 586332e6..a12c656e 100644 --- a/src/components/AppHeader.svelte +++ b/src/components/AppHeader.svelte @@ -77,7 +77,7 @@ <nav class="flex justify-end items-center space-x-4 p-5"> {#if user} {#each links as { href, icon: Icon, label }} - <a {href} data-sveltekit-preload-code="eager" aria-label={label}> + <a {href} data-sveltekit-preload-data="tap" aria-label={label}> <button class="flex justify-center items-center bg-base-100 p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl {opacity(href)}" aria-label={label}> <Icon width={(w ?? 0) > 640 ? 32 : 24} /> </button> diff --git a/src/components/Avatar.svelte b/src/components/Avatar.svelte index c56b7486..c5083d75 100644 --- a/src/components/Avatar.svelte +++ b/src/components/Avatar.svelte @@ -38,7 +38,7 @@ {#if disabled} {@render body()} {:else if link} - <a href={link} class:pointer-events-none={disabled}> + <a href={link} data-sveltekit-preload-data="tap" class:pointer-events-none={disabled}> {@render body()} </a> {:else} |
