aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
5485acdf0f13ba4b2e8ef33dca33c1e'>src/routes/(app)/[username]/settings/[...tab]/_pos.svelte
+++ b/src/routes/(app)/[username]/settings/[...tab]/_pos.svelte
@@ -33,12 +33,20 @@
</select>
</div>
-<div class="space-y-1">
+<div class="space-y-1 relative">
<label for="email" class="font-bold block">{$t("user.settings.email")}</label>
<p class="text-secondary">
{$t("user.settings.emailDescription")}
</p>
- <input type="text" name="email" bind:value={user.email} />
+
+ <div class="relative">
+ <input type="text" name="email" bind:value={user.email} />
+ {#if user.verified}
+ <Icon icon="check" style="absolute right-5 top-3 w-8" />
+ {:else}
+ <Icon icon="orangeclock" style="absolute right-5 top-3 w-8" />
+ {/if}
+ </div>
</div>
<div>
diff --git a/src/routes/(app)/[username]/verify/[code]/+page.server.js b/src/routes/(app)/[username]/verify/[code]/+page.server.js
new file mode 100644
index 00000000..b777b2b8
--- /dev/null
+++ b/src/routes/(app)/[username]/verify/[code]/+page.server.js
@@ -0,0 +1,13 @@
+import { get } from "$lib/utils";
+import { error } from "@sveltejs/kit";
+
+export let load = async ({ params: { code } }) => {
+ try {
+ console.log("CODE", code);
+ let user = await get(`/verify/${code}`);
+ return { user };
+ } catch (e) {
+ console.log(e);
+ return { error: "Verification failed" };
+ }
+};
diff --git a/src/routes/(app)/[username]/verify/[code]/+page.svelte b/src/routes/(app)/[username]/verify/[code]/+page.svelte
new file mode 100644
index 00000000..e9baec8a
--- /dev/null
+++ b/src/routes/(app)/[username]/verify/[code]/+page.svelte
@@ -0,0 +1,34 @@
+<script>
+ import Icon from "$comp/Icon.svelte";
+ import { t } from "$lib/translations";
+
+ export let data;
+ let { user, error } = data;
+</script>
+
+<div class="container px-4 text-center mx-auto">
+ {#if error}
+ <h1 class="text-3xl md:text-4xl font-bold mb-6">
+ Email verification failed
+ </h1>
+ {:else if user.verified}
+ <div
+ class="flex w-full py-5 max-w-[200px] mx-auto"
+ in:scale={{ start: 0.5 }}
+ >
+ <Icon icon="check" style="mx-auto" />
+ </div>
+
+ <h1 class="text-3xl md:text-4xl font-bold mb-6">
+ Email verified successfully!
+ </h1>
+ {/if}
+</div>
+
+<a href={`/${user.username}`}>
+ <div class="opacity-0 w-screen h-screen fixed top-0 left-0 z-50" />
+</a>
+
+<div class="fixed bottom-10 w-full text-center">
+ {$t("payments.tapAnywhere")}
+</div>
diff --git a/static/icons/clock.svg b/static/icons/clock.svg
index 9ea9d1f3..c91ef3dd 100644
--- a/static/icons/clock.svg
+++ b/static/icons/clock.svg
@@ -1,3 +1,4 @@
-<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M12 8V12L15 15M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M12 7V12L14.5 10.5M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
diff --git a/static/icons/orangeclock.svg b/static/icons/orangeclock.svg
new file mode 100644
index 00000000..2b07c198
--- /dev/null
+++ b/static/icons/orangeclock.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
+<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M12 7V12L14.5 10.5M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="#FF9900" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
+</svg>