aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-26 21:45:00 -0800
committerAdam Soltys <[email protected]>2024-11-26 21:45:00 -0800
commitf4eb6547d0db5edd0137fdefe461433500515040 (patch)
tree86a24ca7f263f80f322d59b2e5def5fc6b062719 /src/routes
parent872aa0b3b0b9a847b8afcdee7f1ad53c524ce4f0 (diff)
downloadcoinos-ui-f4eb6547d0db5edd0137fdefe461433500515040.tar.gz
coinos-ui-f4eb6547d0db5edd0137fdefe461433500515040.zip
warnings
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte60
-rw-r--r--src/routes/(app)/invoice/[id]/paid/+page.svelte37
2 files changed, 12 insertions, 85 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte
index b754a886..b2c1970a 100644
--- a/src/routes/(app)/[username]/(profile)/+page.svelte
+++ b/src/routes/(app)/[username]/(profile)/+page.svelte
@@ -1,10 +1,8 @@
<script>
import { scale } from "svelte/transition";
import { btc, f, sat } from "$lib/utils";
- import Icon from "$comp/Icon.svelte";
import Account from "$comp/Account.svelte";
import Balance from "$comp/Balance.svelte";
- import Items from "$comp/Items.svelte";
import { t } from "$lib/translations";
import { installPrompt } from "$lib/store";
import { afterNavigate, preloadData } from "$app/navigation";
@@ -52,62 +50,4 @@
</button>
{/if}
{/if}
-
- <Items {items} {subject} {user} {total} {currency} {rate} />
-
- <div
- class="fixed inset-x-0 mx-auto flex bottom-16 px-4"
- class:static={!items.length}
- >
- {#if total > 0}
- <button
- class="rounded-2xl py-5 px-6 font-bold hover:bg-neutral-700 flex bg-black text-white mx-auto"
- onclick={checkout}
- >
- <div class="mx-auto flex">
- <div class="my-auto text-2xl">
- {$t("user.dashboard.checkout")}
- {f(total, currency)}
- <span class="text-base">
- {sat(btc(total, rate), currency)}
- </span>
- </div>
- </div>
- </button>
- {:else if user?.username !== subject.username && (!subject.anon || subject.lud16)}
- <a
- href={subject.anon
- ? `/send/${encodeURIComponent(subject.lud16)}`
- : `/pay/${subject.username}`}
- class="contents"
- >
- <button class="btn btn-accent !text-2xl items-center !w-full sm:!max-w-[400px] mx-auto">
- <iconify-icon icon="ph:lightning-fill" class="text-yellow-300"
- ></iconify-icon>
- <div>
- {$t("user.pay")}
- {subject.username}
- </div>
- </button>
- </a>
- {/if}
- </div>
</div>
-
-<style>
- .custom-shadow-item {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- visibility: visible;
- background: #333;
- opacity: 0.5;
- margin: 0;
- }
-
- .bottom-half {
- @apply bottom-1/2;
- }
-</style>
diff --git a/src/routes/(app)/invoice/[id]/paid/+page.svelte b/src/routes/(app)/invoice/[id]/paid/+page.svelte
index b031dd8c..2cd718be 100644
--- a/src/routes/(app)/invoice/[id]/paid/+page.svelte
+++ b/src/routes/(app)/invoice/[id]/paid/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import Amount from "$comp/Amount.svelte";
import Success from "$comp/Success.svelte";
import { t } from "$lib/translations";
@@ -11,35 +12,21 @@
</script>
<div class="container px-4 text-center mx-auto">
- <Success
- amount={received - tip}
- {rate}
- {tip}
- {currency}
- title={$t("invoice.paymentSuccessful")}
- />
-
{#if pending}
- <div class="flex w-full py-5 max-w-[200px] mx-auto">
- <Icon icon="orangeclock" style="mx-auto" />
- </div>
+ <iconify-icon icon="ph:clock-bold" class="text-warning" width="160"
+ ></iconify-icon>
<h1 class="text-3xl md:text-4xl font-bold mb-6">Payment detected</h1>
- <h2 class="text-2xl md:text-3xl font-semibold">
- {f(toFiat(pending - tip, rate), currency)}
- {#if tip}
- + {f(toFiat(tip, rate), currency)}
- {/if}
- </h2>
- <h3 class="text-secondary md:text-lg mb-6 mt-1">
- ⚡️{s(pending - tip)}
- {#if tip}
- <span class="text-lg">
- + ⚡️{s(tip)}
- </span>
- {/if}
- </h3>
+ <Amount amount={pending - tip} {tip} {rate} {currency} />
+ {:else}
+ <Success
+ amount={received - tip}
+ {rate}
+ {tip}
+ {currency}
+ title={$t("invoice.paymentSuccessful")}
+ />
{/if}
</div>