From 9a1cbd040ead975d51f23f9546ba8d8bf9034207 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 1 Dec 2023 15:17:58 -0800 Subject: optimizing --- static/images/customize.webp | Bin 210574 -> 81624 bytes static/images/hero-image.webp | Bin 258018 -> 72000 bytes static/images/lightning-qr.webp | Bin 132588 -> 65206 bytes static/images/phone-checkout.webp | Bin 386656 -> 50980 bytes static/images/test.webp | Bin 33858 -> 0 bytes 5 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 static/images/test.webp (limited to 'static/images') diff --git a/static/images/customize.webp b/static/images/customize.webp index 9d558683..a5c9a37f 100644 Binary files a/static/images/customize.webp and b/static/images/customize.webp differ diff --git a/static/images/hero-image.webp b/static/images/hero-image.webp index 794e764b..c4dd22bd 100644 Binary files a/static/images/hero-image.webp and b/static/images/hero-image.webp differ diff --git a/static/images/lightning-qr.webp b/static/images/lightning-qr.webp index 9d4eb3c2..0462e28f 100644 Binary files a/static/images/lightning-qr.webp and b/static/images/lightning-qr.webp differ diff --git a/static/images/phone-checkout.webp b/static/images/phone-checkout.webp index a6d81ded..0d075c63 100644 Binary files a/static/images/phone-checkout.webp and b/static/images/phone-checkout.webp differ diff --git a/static/images/test.webp b/static/images/test.webp deleted file mode 100644 index cbe25d5a..00000000 Binary files a/static/images/test.webp and /dev/null differ -- cgit v1.2.3 From c4e36c6e9b1132d3fc89fbba7fc77848b29a0915 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 6 Dec 2023 13:56:22 -0800 Subject: email verify --- .../[username]/settings/[...tab]/+page.server.js | 3 ++- .../[username]/settings/[...tab]/+page.svelte | 26 +++++++++++++++------ .../(app)/[username]/settings/[...tab]/_pos.svelte | 1 + .../(app)/[username]/verify/[code]/+page.server.js | 1 - .../(app)/[username]/verify/[code]/+page.svelte | 1 + src/routes/(static)/docs/+page.svelte | 10 +++++++- static/images/logo.jpg | Bin 0 -> 30971 bytes 7 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 static/images/logo.jpg (limited to 'static/images') diff --git a/src/routes/(app)/[username]/settings/[...tab]/+page.server.js b/src/routes/(app)/[username]/settings/[...tab]/+page.server.js index 156b6062..2acad2dd 100644 --- a/src/routes/(app)/[username]/settings/[...tab]/+page.server.js +++ b/src/routes/(app)/[username]/settings/[...tab]/+page.server.js @@ -1,9 +1,10 @@ import { fail, redirect } from "@sveltejs/kit"; import { fd, auth, get, post } from "$lib/utils"; -export function load({ params, url }) { +export function load({ cookies, params, url }) { if (url.pathname.endsWith("settings")) throw redirect(307, url.pathname + "/account"); + params.cookies = cookies.getAll(); return params; } diff --git a/src/routes/(app)/[username]/settings/[...tab]/+page.svelte b/src/routes/(app)/[username]/settings/[...tab]/+page.svelte index d0ee7eba..baef4d8e 100644 --- a/src/routes/(app)/[username]/settings/[...tab]/+page.svelte +++ b/src/routes/(app)/[username]/settings/[...tab]/+page.svelte @@ -8,7 +8,7 @@ import Spinner from "$comp/Spinner.svelte"; import Pin from "$comp/Pin.svelte"; import { t } from "$lib/translations"; - import { fail, post, sleep, warning, success } from "$lib/utils"; + import { fail, auth, post, sleep, warning, success } from "$lib/utils"; import { avatar, banner, password, pin } from "$lib/store"; import { upload } from "$lib/upload"; import { page } from "$app/stores"; @@ -28,7 +28,7 @@ let submit; let formElement; - let { user, token, rates, tab } = data; + let { user, token, rates, tab, cookies } = data; let prev; $: update(data); @@ -134,13 +134,24 @@ if (user.email !== prev.email) { try { - await post("/api/request", user); - warning("Verification email sent"); - await sleep(4000); - } catch(e) { + cookies.get = function (n) { + return this.find((c) => c.name === n).value; + }; + + user.verified = false; + + await post( + "/api/request", + { id: user.id, email: user.email }, + auth(cookies) + ); + + warning("Verification email sent"); + await sleep(4000); + } catch (e) { console.log(e); } - } + } const response = await fetch(formElement.action, { method: "POST", @@ -188,6 +199,7 @@ {#each tabs.filter((t) => t.name !== "shopify") as { name, key }}