From 8d90bfd0b4f35c91c6a2a57db63317510569050a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 31 Oct 2022 12:44:41 -0700 Subject: adjust tip and qr styles --- src/routes/invoice/[id]/+page.svelte | 36 +++++++++++++++------------- src/routes/invoice/[id]/tip/+page.svelte | 41 +++++++++++++------------------- 2 files changed, 35 insertions(+), 42 deletions(-) (limited to 'src/routes') diff --git a/src/routes/invoice/[id]/+page.svelte b/src/routes/invoice/[id]/+page.svelte index 16ec186e..17eac2f5 100644 --- a/src/routes/invoice/[id]/+page.svelte +++ b/src/routes/invoice/[id]/+page.svelte @@ -3,7 +3,7 @@ import { onMount, onDestroy } from 'svelte'; import { browser } from '$app/environment'; import { invoices, last } from '$lib/store'; - import { Icon, Heart, Image, Qr, Tip } from '$comp'; + import { Icon, Heart, Image, Qr } from '$comp'; import { goto } from '$app/navigation'; import { t } from '$lib/translations'; @@ -62,7 +62,7 @@
-
+
Scan to pay {username} -
+
-
- {$t('invoice.invoice')} - {f(amountFiat, currency)} - {`(${s(amount)} SAT)`} -
+ {#if invoice.tip} +
+ {$t('invoice.invoice')} + {f(amountFiat, currency)} + {`(${s(amount)} SAT)`} +
-
- {$t('invoice.tip')} - {f(tipAmount, currency)} - {`(${s(tip)} SAT)`} -
+
+ {$t('invoice.tip')} + {f(tipAmount, currency)} + {`(${s(tip)} SAT)`} +
+ {/if}
{$t('invoice.total')} diff --git a/src/routes/invoice/[id]/tip/+page.svelte b/src/routes/invoice/[id]/tip/+page.svelte index 26eeba31..12e8e257 100644 --- a/src/routes/invoice/[id]/tip/+page.svelte +++ b/src/routes/invoice/[id]/tip/+page.svelte @@ -2,13 +2,13 @@ import { browser } from '$app/environment'; import { invoices } from '$lib/store'; import { copy, f, get, reverseFormat, s, sats } from '$lib/utils'; - import { Icon, Tip } from '$comp'; + import { Icon } from '$comp'; import { goto } from '$app/navigation'; import { t } from '$lib/translations'; import { enhance } from '$app/forms'; import { tick } from 'svelte'; - const tipAmounts = ['No thank you', '10%', '15%', '20%']; + const tipAmounts = ['None', '10%', '15%', '20%']; let showCustomAmount; let customInput; @@ -44,7 +44,7 @@ let submitting; const handleTipButtonClick = async (amount) => { submitting = true; - if (amount === 'No thank you') { + if (amount === 'None') { tipPercent = 0; } else { tipPercent = parseInt(amount.slice(0, 2)); @@ -138,50 +138,37 @@ on:input={handleSlide} /> -
+
- + {f(amountFiat, currency)} - +{f(tipAmount, currency)} + +{f(tipAmount, currency)} +
- {s(amount)} - +{s(tip)} SAT + {s(amount)} + +{s(tip)} SAT
{#if tip}
- - + +
{:else} {#each tipAmounts as amount} {/each} {/if}
- +
{/if} @@ -258,4 +245,8 @@ .active { @apply !bg-black !text-white; } + + .container button[type='button'] { + @apply w-full mt-2 bg-primary text-black hover:bg-black hover:text-white font-semibold py-5 px-7 rounded-2xl; + } -- cgit v1.2.3