From 301770cb05331c8cbb32f60b11c62a79c9d28df3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 27 Feb 2023 19:28:59 -0800 Subject: prettier --- src/components/AppHeader.svelte | 1 - src/components/LandingHeader.svelte | 26 +++++++-------- .../(app)/[username]/invoice/[hash]/+page.svelte | 36 +++++++-------------- src/routes/(app)/payment/[id]/+page.svelte | 37 +++++++++++----------- .../bitcoin/[address]/[...amount]/+page.svelte | 10 ++++-- src/routes/(app)/sent/+page.svelte | 2 +- 6 files changed, 52 insertions(+), 60 deletions(-) (limited to 'src') diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte index 74afd7b9..51c70851 100644 --- a/src/components/AppHeader.svelte +++ b/src/components/AppHeader.svelte @@ -15,7 +15,6 @@ let menuButtons; if (user) menuButtons = [ - { key: 'nav.profile', icon: 'profile', href: `/${user.username}` }, { key: 'nav.settings', icon: 'settings', href: `/${user.username}/settings` }, { key: 'nav.support', icon: 'support', href: `/support` }, { key: 'nav.signOut', icon: 'logout', href: `/logout` } diff --git a/src/components/LandingHeader.svelte b/src/components/LandingHeader.svelte index f9db5ea0..ed7907c1 100644 --- a/src/components/LandingHeader.svelte +++ b/src/components/LandingHeader.svelte @@ -40,29 +40,29 @@ {/if} - {#if !user} + {#if user} {:else} {/if} diff --git a/src/routes/(app)/[username]/invoice/[hash]/+page.svelte b/src/routes/(app)/[username]/invoice/[hash]/+page.svelte index 2ff92687..fff2b22c 100644 --- a/src/routes/(app)/[username]/invoice/[hash]/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[hash]/+page.svelte @@ -7,7 +7,6 @@ import { last } from '$lib/store'; import { Avatar, Icon, Heart, Image } from '$comp'; import { t } from '$lib/translations'; - import screenfull from 'screenfull'; import { goto, invalidate } from '$app/navigation'; export let data; @@ -67,14 +66,6 @@ $: link = type === 'bitcoin' ? text : `lightning:${text}`; $: txt = type === 'bitcoin' ? hash : text; - let full; - let toggle = () => { - screenfull.toggle(qr); - full = !full; - if (full) src = lg; - else src = sm; - }; - let toggleType = async () => { invoice.type = invoice.type === types.lightning ? types.bitcoin : types.lightning; ({ hash } = await post(`/${username}/invoice`, { @@ -111,21 +102,18 @@
Bitcoin
-
-
- {txt} -
-
+ +
+ + {#if amount > 0} diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index b8a23605..2e170a43 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -26,14 +26,14 @@ {#if p.with}
{amount > 0 ? 'From' : 'To'} - - {/if} @@ -42,18 +42,19 @@
{f(fiat(a, rate), currency)} {#if tip} - - + {f(fiat(tip, rate), currency)} - + + + {f(fiat(tip, rate), currency)} + {/if} - ⚡️{`${s(a)}`} - - {#if tip} - - + ⚡️{s(tip)} - - {/if} - + ⚡️{`${s(a)}`} + + {#if tip} + + + ⚡️{s(tip)} + + {/if} +
diff --git a/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte b/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte index b3a944f4..77d5fde6 100644 --- a/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte +++ b/src/routes/(app)/send/bitcoin/[address]/[...amount]/+page.svelte @@ -22,7 +22,7 @@ loading = false; if (form?.message?.includes('pin')) $pin = undefined; if (form) ({ min, max, feeRate, fee, ourfee, subtract } = form); - if (!ourfee) ourfee = 0; + if (!ourfee) ourfee = 0; if (feeRate) confirmed = true; stale = false; }; @@ -77,7 +77,9 @@ {f(toFiat(fee + ourfee, $selectedRate), currency)}

⚡️{s(fee + ourfee)}

- +
{:else} @@ -104,7 +106,9 @@
- +
{/if} diff --git a/src/routes/(app)/sent/+page.svelte b/src/routes/(app)/sent/+page.svelte index 72511487..760d2e1d 100644 --- a/src/routes/(app)/sent/+page.svelte +++ b/src/routes/(app)/sent/+page.svelte @@ -7,7 +7,7 @@ export let data; let { payments, user } = data; - let { currency, username } = user; + let { currency, username } = user; let payment = payments[0]; let { amount, rate, tip } = payment; -- cgit v1.2.3