aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/routes/(main)/(app)/+layout.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'code/app/src/routes/(main)/(app)/+layout.svelte')
-rw-r--r--code/app/src/routes/(main)/(app)/+layout.svelte27
1 files changed, 24 insertions, 3 deletions
diff --git a/code/app/src/routes/(main)/(app)/+layout.svelte b/code/app/src/routes/(main)/(app)/+layout.svelte
index e57bc3b..936e0a7 100644
--- a/code/app/src/routes/(main)/(app)/+layout.svelte
+++ b/code/app/src/routes/(main)/(app)/+layout.svelte
@@ -22,12 +22,13 @@
TransitionRoot,
} from "@rgossiaux/svelte-headlessui";
import { DialogPanel } from "@developermuch/dev-svelte-headlessui";
- import { Input } from "$components";
+ import { Input, Notification } from "$components";
import { goto } from "$app/navigation";
import { page } from "$app/stores";
+ import { onMount } from "svelte";
+ import { fgs, sgs } from "$help/global-state";
- const accountService = new AccountService();
-
+ const accountService = AccountService.resolve();
const session = {
profile: {
username: "Brukernavn",
@@ -37,6 +38,12 @@
let sidebarOpen = false;
let sidebarSearchValue: string | undefined;
+ let showEmailValidatedNotif = false;
+
+ onMount(() => {
+ showEmailValidatedNotif = fgs("showEmailValidatedAlertWhenLoggedIn") === "true";
+ if (showEmailValidatedNotif) sgs("showEmailValidatedAlertWhenLoggedIn", false);
+ });
function sign_out() {
accountService.end_session(() => goto("/sign-in"));
@@ -71,6 +78,20 @@
];
</script>
+{#if showEmailValidatedNotif}
+ <Notification
+ title="Email successfully validated"
+ subtitle="Because of this, you now have gained access to more functionality"
+ show={true}
+ />
+
+ <Notification
+ title="Email successfully validated"
+ subtitle="Because of this, you now have gained access to more functionality"
+ show={true}
+ />
+{/if}
+
<div class="min-h-full">
<!-- Mobile sidebar -->
<TransitionRoot show={sidebarOpen}>