From e195d2fe45e4e006df0404929ffef4f739caa8c7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 2 Aug 2022 12:42:28 -0700 Subject: remove user check from invoice page --- src/routes/invoice/[id].svelte | 310 ++++++++++++++++++++--------------------- 1 file changed, 151 insertions(+), 159 deletions(-) diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte index 126a474e..2e3d257c 100644 --- a/src/routes/invoice/[id].svelte +++ b/src/routes/invoice/[id].svelte @@ -129,185 +129,177 @@ }; -{#if $user} - {#if $invoices[id]?.status !== 'paid'} -
- + +
+
- - - -
+
- -
-

Add a tip?

+

Add a tip?

+ +
+ {tipAmountFormatted}{`(${tipAmountSats} SATS)`} + {tipPercent}% +
+ + { + customTipAmount = ''; + customInput.value = ''; + tipPercent = e.target.value; + }} + /> -
- {tipAmountFormatted}{`(${tipAmountSats} SATS)`} + {#each tipAmounts as amount} + - {tipPercent}% -
+ {/each} - { - customTipAmount = ''; - customInput.value = ''; - tipPercent = e.target.value; - }} - /> - -
- {#each tipAmounts as amount} - - {/each} - -
- $ - handleCustomTipAmount(e)} - class="bg-primary rounded-2xl py-3 px-10 font-semibold mt-2 mr-1 w-full md:w-auto" - placeholder="Other" - /> - -
+ : 'opacity-100' + : !customTipAmount + ? 'opacity-50' + : 'opacity-100'}" + disabled={showMobileTip ? !customTipAmount && !tipAmount : !customTipAmount} + on:click={() => (showMobileTip = false)}>Done
+
+ + +{:else} +
+ +

Payment Successful!

+

+ {totalAmountFormatted} + {$preferredCurrency} +

+

({totalAmountSats} SATS)

+ +
{/if}