From e3afaf16b32558ac2ac407777760e462b4896a92 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 5 Nov 2024 13:31:53 -0800 Subject: dark styles --- src/components/Numpad.svelte | 35 +++++----- src/components/Password.svelte | 10 +-- src/components/Pin.svelte | 13 ++-- src/components/Pinpad.svelte | 93 +++++++++++++------------- src/components/SetAmount.svelte | 4 +- src/routes/(app)/+layout.svelte | 2 +- src/routes/(app)/settings/[...tab]/_pos.svelte | 20 +++--- 7 files changed, 84 insertions(+), 93 deletions(-) (limited to 'src') diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte index 694f5754..07d1ef4c 100644 --- a/src/components/Numpad.svelte +++ b/src/components/Numpad.svelte @@ -181,6 +181,18 @@ let keydown = (e) => e.key === "Enter" && (e.preventDefault() || submit.click()); + + let swap = () => { + if (fiat) { + amount = parseInt((amountFiat / (rate / sats)).toFixed(0)); + } else { + amountFiat = + (amount * (rate / sats)).toFixed(2) > 0.0 + ? (amount * (rate / sats)).toFixed(2) + : 0; + } + fiat = !fiat; + };
@@ -204,24 +216,11 @@ bind:this={element} />
-
- {fiat ? "⚡️" + s(amount) : f(amountFiat, currency)} - +
+ {fiat ? "⚡️" + s(amount) : f(amountFiat, currency)}
diff --git a/src/components/Password.svelte b/src/components/Password.svelte index 14fdf500..cb57eec5 100644 --- a/src/components/Password.svelte +++ b/src/components/Password.svelte @@ -23,7 +23,7 @@
(revealPassword = !revealPassword)} class="absolute right-5 top-6" > - +
diff --git a/src/components/Pin.svelte b/src/components/Pin.svelte index 3a8e9e84..fb17c612 100644 --- a/src/components/Pin.svelte +++ b/src/components/Pin.svelte @@ -44,9 +44,12 @@ {#if loaded} -
+

{title}

@@ -57,7 +60,6 @@ > - {:else} - - {/if} + + +
+ {#each numPad as value} + {#if value === arrow} -
- -
- {#each numPad as value} - {#if value === arrow} - - {:else} - - {/if} - {/each} -
-
+ {:else} + + {/if} + {/each}
diff --git a/src/components/SetAmount.svelte b/src/components/SetAmount.svelte index 7f007adc..8b581096 100644 --- a/src/components/SetAmount.svelte +++ b/src/components/SetAmount.svelte @@ -16,10 +16,10 @@ {#if settingAmount}
-
+
{#if !$loading} diff --git a/src/routes/(app)/settings/[...tab]/_pos.svelte b/src/routes/(app)/settings/[...tab]/_pos.svelte index 2804da37..f4a01c09 100644 --- a/src/routes/(app)/settings/[...tab]/_pos.svelte +++ b/src/routes/(app)/settings/[...tab]/_pos.svelte @@ -165,7 +165,7 @@ >{$t("user.settings.threshold")} Ok
@@ -232,10 +229,10 @@ {#if editingReserve}

{$t("user.settings.reserve")} @@ -251,8 +248,7 @@ bind:this={doneReserve} type="button" on:click={doneEditing} - class="p-4 bg-black text-white rounded-2xl text-lg font-semibold w-full" - >OkOk

-- cgit v1.2.3