aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/InvoiceTypes.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/InvoiceTypes.svelte')
-rw-r--r--src/components/InvoiceTypes.svelte16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/components/InvoiceTypes.svelte b/src/components/InvoiceTypes.svelte
index b518364d..489fb367 100644
--- a/src/components/InvoiceTypes.svelte
+++ b/src/components/InvoiceTypes.svelte
@@ -2,7 +2,6 @@
import PhLightningFill from "virtual:icons/ph/lightning-fill";
import PhXBold from "virtual:icons/ph/x-bold";
import { types } from "$lib/utils";
- import { page } from "$app/stores";
import { amountPrompt } from "$lib/store";
let {
newAmount = $bindable(),
@@ -14,6 +13,7 @@
setAmount,
setType,
activeOnly = false,
+ lnurlMode = false,
} = $props();
let { aid, address_type, type } = $derived(invoice);
@@ -60,10 +60,9 @@
<div class="flex flex-wrap gap-2">
<button
class="btn flex-nowrap !w-auto grow"
- class:bg-base-300={type === types.lightning && $page.url.pathname.includes("/receive")}
- class:text-secondary={type === types.lightning && $page.url.pathname.includes("/receive")}
- class:hidden={activeOnly &&
- (type !== types.lightning || !$page.url.pathname.includes("/receive"))}
+ class:bg-base-300={lnurlMode}
+ class:text-secondary={lnurlMode}
+ class:hidden={activeOnly && !lnurlMode}
onclick={() => {
if (activeOnly) toggleType();
else {
@@ -97,10 +96,9 @@
<button
class="btn flex-nowrap !w-auto grow"
- class:bg-base-300={type === types.lightning && !$page.url.pathname.includes("/receive")}
- class:text-secondary={type === types.lightning && !$page.url.pathname.includes("/receive")}
- class:hidden={activeOnly &&
- (type !== types.lightning || $page.url.pathname.includes("/receive"))}
+ class:bg-base-300={type === types.lightning && !lnurlMode}
+ class:text-secondary={type === types.lightning && !lnurlMode}
+ class:hidden={activeOnly && !(type === types.lightning && !lnurlMode)}
onclick={() => {
if (activeOnly) toggleType();
else {