From 84fb4b209a2650b2a93f3208ee9a23a44d8283c7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 8 Nov 2024 15:19:04 -0800 Subject: svelte 5 fixups --- src/components/Avatar.svelte | 22 +++++++++++---- src/components/InvoiceData.svelte | 2 -- src/components/LocationsMap.svelte | 47 ++++++++++++++++---------------- src/components/Numpad.svelte | 55 +++++++++++++------------------------- src/components/Pin.svelte | 50 +++++++++++++--------------------- 5 files changed, 78 insertions(+), 98 deletions(-) (limited to 'src/components') diff --git a/src/components/Avatar.svelte b/src/components/Avatar.svelte index 3007c3e7..04f346b1 100644 --- a/src/components/Avatar.svelte +++ b/src/components/Avatar.svelte @@ -1,5 +1,5 @@ - +{#snippet body()}
@@ -39,4 +43,12 @@ onerror={handle} />
-
+{/snippet} + +{#if disabled} + {@render body()} +{:else} + + {@render body()} + +{/if} diff --git a/src/components/InvoiceData.svelte b/src/components/InvoiceData.svelte index da1ea5d9..2298d150 100644 --- a/src/components/InvoiceData.svelte +++ b/src/components/InvoiceData.svelte @@ -4,7 +4,6 @@ showQr, src, link, - qr = $bindable(), txt, invoice, amount, @@ -21,7 +20,6 @@ {txt} diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte index b04b8e98..36223b75 100644 --- a/src/components/LocationsMap.svelte +++ b/src/components/LocationsMap.svelte @@ -1,7 +1,6 @@
@@ -259,29 +260,29 @@ id="map-container" class="mx-auto h-full w-full z-0" bind:this={mapContainer} ->
+ >
{#if !showList}
-
+
{#if search} {:else} - + {/if}
@@ -300,19 +301,19 @@ {/if}
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte index 03c7c48f..07d1ef4c 100644 --- a/src/components/Numpad.svelte +++ b/src/components/Numpad.svelte @@ -1,33 +1,21 @@ -
@@ -225,17 +208,17 @@ use:focus contenteditable bind:innerHTML={html} - onfocus={select} - onblur={blur} - oninput={input} - onkeydown={keydown} + on:focus={select} + on:blur={blur} + on:input={input} + on:keydown={keydown} class="outline-none my-auto" bind:this={element} - >
+ />
{fiat ? "⚡️" + s(amount) : f(amountFiat, currency)}
@@ -247,7 +230,7 @@ @@ -255,7 +238,7 @@ {/if} diff --git a/src/components/Pin.svelte b/src/components/Pin.svelte index da53577e..fb17c612 100644 --- a/src/components/Pin.svelte +++ b/src/components/Pin.svelte @@ -1,36 +1,28 @@ - {#if loaded}
{$t("user.settings.rememberFor")} - @@ -86,7 +72,7 @@
-
-- cgit v1.2.3