From c5ef18aec5de023732eb6b86f768f206462fea93 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Sep 2024 18:59:30 -0700 Subject: wip --- src/components/About.svelte | 5 +- src/components/Account.svelte | 53 +++++++++++ src/components/Balance.svelte | 6 +- src/components/Items.svelte | 209 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 268 insertions(+), 5 deletions(-) create mode 100644 src/components/Account.svelte create mode 100644 src/components/Items.svelte (limited to 'src/components') diff --git a/src/components/About.svelte b/src/components/About.svelte index 1e60db72..01ff4c7c 100644 --- a/src/components/About.svelte +++ b/src/components/About.svelte @@ -91,14 +91,15 @@ {@html $t("about.locations.description")}

+
diff --git a/src/components/Account.svelte b/src/components/Account.svelte new file mode 100644 index 00000000..5286c4d3 --- /dev/null +++ b/src/components/Account.svelte @@ -0,0 +1,53 @@ + + +
+
+ +
{type}
+
+ + +
diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte index 4d5ac6bd..51c56555 100644 --- a/src/components/Balance.svelte +++ b/src/components/Balance.svelte @@ -6,7 +6,7 @@ import { t } from "$lib/translations"; let show; - export let user, rate; + export let user, rate, balance; {#if show && user.haspin && $pin?.length !== 6} @@ -27,12 +27,12 @@ {#if isNaN(rate)}
—
{:else} - {f((user.balance * rate) / sats, user.currency)} + {f((balance * rate) / sats, user.currency)} {/if}
- ⚡️{s(user.balance)} + ⚡️{s(balance)}
{/if} diff --git a/src/components/Items.svelte b/src/components/Items.svelte new file mode 100644 index 00000000..f449215c --- /dev/null +++ b/src/components/Items.svelte @@ -0,0 +1,209 @@ + + + + +{#if deleting} + +{/if} + +{#if items.length} +

Select items

+{/if} +
+ {#each items as i (i.id)} + + + + + + + +
+ {/if} + +
+
+
+
{i.name}
+
+
+ {f(i.price, currency)} +
+
+ {sat(btc(i.price, rate))} +
+
+
+
+ {#if i.quantity} + + {/if} +
+ {#if i.quantity}{i.quantity}{:else}—{/if} +
+ {#if i.quantity} + + {/if} +
+
+
+ + {/each} + -- cgit v1.2.3