diff options
| author | Adam Soltys <[email protected]> | 2023-12-01 20:04:13 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-01 20:04:13 -0800 |
| commit | 216a600224fde22ce76b367557a02094ec693886 (patch) | |
| tree | d1189bbaa39db204633523132a7d4767b952717d /src/components/Invoice.svelte | |
| parent | 7d9bc1f54dfd04172e8d6d43ebc2efd6f407e833 (diff) | |
| download | coinos-ui-216a600224fde22ce76b367557a02094ec693886.tar.gz coinos-ui-216a600224fde22ce76b367557a02094ec693886.zip | |
prettier
Diffstat (limited to 'src/components/Invoice.svelte')
| -rw-r--r-- | src/components/Invoice.svelte | 61 |
1 files changed, 34 insertions, 27 deletions
diff --git a/src/components/Invoice.svelte b/src/components/Invoice.svelte index b0cd58a2..363d260a 100644 --- a/src/components/Invoice.svelte +++ b/src/components/Invoice.svelte @@ -1,32 +1,39 @@ <script> - import { t } from '$lib/translations'; - import { f, sat, sats } from '$lib/utils'; - import { fly } from 'svelte/transition'; - import { Avatar, Icon } from '$comp'; - import { invoice } from '$lib/store'; + import { t } from "$lib/translations"; + import { f, sat, sats } from "$lib/utils"; + import { fly } from "svelte/transition"; + import { Avatar, Icon } from "$comp"; + import { invoice } from "$lib/store"; </script> {#if $invoice} - <div class="fixed bottom-0 border-t w-full p-4 bg-white z-50" in:fly> - <div class="flex flex-wrap md:flex-nowrap max-w-xl mx-auto gap-2"> - <div class="my-auto mx-auto"> - <div class="flex"> - <Avatar user={$invoice.user.username} size={12} /> - <h1 class="my-auto"> - <b>{$invoice.user.username}</b> - {$t('payments.isRequesting')} - <b>{f(($invoice.amount * $invoice.rate) / sats, $invoice.currency)}</b> - {sat($invoice.amount)} - </h1> - </div> - </div> - <div class="mx-auto my-auto flex gap-2"> - <a href={`/${invoice.user.username}/invoice/${$invoice.id}/tip`}> - <button class="rounded-full border py-2 px-4 font-bold hover:opacity-80 w-32"> - {$t('payments.pay')} - </button> - </a> - </div> - </div> - </div> + <div class="fixed bottom-0 border-t w-full p-4 bg-white z-50" in:fly> + <div class="flex flex-wrap md:flex-nowrap max-w-xl mx-auto gap-2"> + <div class="my-auto mx-auto"> + <div class="flex"> + <Avatar user={$invoice.user.username} size={12} /> + <h1 class="my-auto"> + <b>{$invoice.user.username}</b> + {$t("payments.isRequesting")} + <b + >{f( + ($invoice.amount * $invoice.rate) / sats, + $invoice.currency + )}</b + > + {sat($invoice.amount)} + </h1> + </div> + </div> + <div class="mx-auto my-auto flex gap-2"> + <a href={`/${invoice.user.username}/invoice/${$invoice.id}/tip`}> + <button + class="rounded-full border py-2 px-4 font-bold hover:opacity-80 w-32" + > + {$t("payments.pay")} + </button> + </a> + </div> + </div> + </div> {/if} |
