-
Add a tip?
-
-
- {tipAmountFormatted}{`(${tipAmountSats} SATS)`}
- {tipPercent}%
-
-
-
{
- customTipAmount = '';
- tipPercent = e.target.value;
- }}
- />
-
-
- {#each tipAmounts as amount}
-
goto('/receive')}>
+
+
+
+
+
+ {#if $invoiceAmount && $invoiceAmountFiat && $rate && text}
+
+
+
Add a tip?
+
+
+ {tipAmountFormatted}{`(${tipAmountSats} SATS)`}
- {/each}
+ {tipPercent}%
+
-
-
-
-
-
-
-
-
Scan to pay insert name here
-
-
- Invoice
- {invoiceAmountFiatFormatted}
- {`(${invoiceAmountFormatted} SATS)`}
-
-
-
- Tip
- {tipAmountFormatted}
- {`(${tipAmountSats} SATS)`}
-
+
+
+
Scan to pay insert name here
-
-
Total
-
{totalAmountFormatted}
- {`(${totalAmountSats} SATS)`}
+
+
+
+
+ Invoice
+ {invoiceAmountFiatFormatted}
+ {`(${invoiceAmountFormatted} SATS)`}
+
+
+
+ Tip
+ {tipAmountFormatted}
+ {`(${tipAmountSats} SATS)`}
+
+
+
+ Total
+ {totalAmountFormatted}
+ {`(${totalAmountSats} SATS)`}
+
-
- {:else}
-
-
-
- {/if}
+ {:else}
+
+
+
+ {/if}
+
-
+{/if}
diff --git a/static/icons/heart.svg b/static/icons/heart.svg
new file mode 100644
index 00000000..f3a5f757
--- /dev/null
+++ b/static/icons/heart.svg
@@ -0,0 +1,3 @@
+
--
cgit v1.2.3
From 8acc59a86b6ec049dfe07f92fd19eeda726136f3 Mon Sep 17 00:00:00 2001
From: Adam Soltys
Date: Sat, 30 Jul 2022 09:47:08 -0700
Subject: logout function
---
src/components/AppHeader.svelte | 4 +++-
src/components/RegisterOrLogin.svelte | 4 ++--
src/lib/socket.js | 4 ++++
src/routes/[...path].svelte | 16 ----------------
src/routes/[username].js | 3 +++
src/routes/[username].svelte | 27 +++++++++++++++++++++++++++
src/routes/__layout.svelte | 23 +++++++++++++++++++----
src/routes/logout/done.svelte | 13 +++++++++++++
src/routes/logout/index.js | 26 ++++++++++++++++++++++++++
src/routes/logout/index.svelte | 10 ++++++++++
src/routes/receive.svelte | 4 ----
static/icons/logout.svg | 3 +++
12 files changed, 110 insertions(+), 27 deletions(-)
delete mode 100644 src/routes/[...path].svelte
create mode 100644 src/routes/[username].js
create mode 100644 src/routes/[username].svelte
create mode 100644 src/routes/logout/done.svelte
create mode 100644 src/routes/logout/index.js
create mode 100644 src/routes/logout/index.svelte
create mode 100644 static/icons/logout.svg
(limited to 'static')
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index 6376e27f..b096f01e 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -14,9 +14,11 @@
-
+
+
+
+
-
+ >
+
-
+
+
(showMenu = !showMenu)}
+ >
+
+
+
+ {#each menuButtons as button}
+ -
+ handleMenuItemClick(button.goto)}
+ > {button.title}
+
+
+ {/each}
+
+
+
+
+
diff --git a/src/components/LandingHeader.svelte b/src/components/LandingHeader.svelte
index 4da9a17e..927c8749 100644
--- a/src/components/LandingHeader.svelte
+++ b/src/components/LandingHeader.svelte
@@ -2,6 +2,7 @@
import { goto } from '$app/navigation';
import { scroll } from '$lib/utils';
import { Icon } from '$comp';
+ import { user } from '$lib/store';
export let howItWorks;
export let faq;
@@ -17,15 +18,24 @@
scroll(howItWorks)}>How It Works
scroll(faq)}>FAQ
About
-
goto('/register')}
- >Start in Seconds
-
goto('/login')}
- >
- Sign in
-
+ {#if !$user}
+
goto('/register')}
+ >Start in Seconds
+
goto('/login')}
+ >
+ Sign in
+
+ {:else}
+
goto('/logout')}
+ >
+ Sign out
+
+ {/if}
diff --git a/src/lib/socket.js b/src/lib/socket.js
index 36d41ea8..c7c541e1 100644
--- a/src/lib/socket.js
+++ b/src/lib/socket.js
@@ -18,7 +18,7 @@ export const messages = (data) => ({
},
payment() {
- console.log(data);
+ console.log(data, 'payment');
},
connected: auth,
diff --git a/src/routes/[username]/customers.svelte b/src/routes/[username]/customers.svelte
new file mode 100644
index 00000000..1935b156
--- /dev/null
+++ b/src/routes/[username]/customers.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/routes/[username]/dashboard.svelte b/src/routes/[username]/dashboard.svelte
new file mode 100644
index 00000000..1935b156
--- /dev/null
+++ b/src/routes/[username]/dashboard.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/routes/[username]/settings.svelte b/src/routes/[username]/settings.svelte
new file mode 100644
index 00000000..1935b156
--- /dev/null
+++ b/src/routes/[username]/settings.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/routes/[username]/support.svelte b/src/routes/[username]/support.svelte
new file mode 100644
index 00000000..1935b156
--- /dev/null
+++ b/src/routes/[username]/support.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/routes/[username]/transactions.svelte b/src/routes/[username]/transactions.svelte
new file mode 100644
index 00000000..1935b156
--- /dev/null
+++ b/src/routes/[username]/transactions.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte
index d26ccfed..736f38e8 100644
--- a/src/routes/__layout.svelte
+++ b/src/routes/__layout.svelte
@@ -18,7 +18,7 @@
if (protectedRoutes.find((p) => $page.url.pathname.match(p))) {
if (!$token) {
goto('/login');
- toast.push('Please login to continue.');
+ toast.push('Please sign in to continue.');
}
user.subscribe((u) => (ready = true));
} else {
diff --git a/static/icons/customers.svg b/static/icons/customers.svg
new file mode 100644
index 00000000..0b6081ba
--- /dev/null
+++ b/static/icons/customers.svg
@@ -0,0 +1,3 @@
+
diff --git a/static/icons/dash.svg b/static/icons/dash.svg
new file mode 100644
index 00000000..acb39ab9
--- /dev/null
+++ b/static/icons/dash.svg
@@ -0,0 +1,3 @@
+
diff --git a/static/icons/logout.svg b/static/icons/logout.svg
index 495d6574..a614cfc0 100644
--- a/static/icons/logout.svg
+++ b/static/icons/logout.svg
@@ -1,3 +1,3 @@
-