From a8219611cbebbd27501d9f30c804979048b98107 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Tue, 13 Dec 2022 14:48:11 +0100
Subject: feat: A whole slew of things

- Use a md5 hash of the session cookie value as key for session validity check
- Introduce global state
- Introduce a common interface for form logic, and implement it on the sign-in form
- Introduce static resolve() on all services instead of new-upping all over.
- Implement /portal on the frontend to support giving the frontend a inital context from server or anywhere.
- Show a notification when users sign in for the first time after validating their email
---
 .../src/routes/(main)/(public)/portal/+page.svelte | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 code/app/src/routes/(main)/(public)/portal/+page.svelte

(limited to 'code/app/src/routes/(main)/(public)/portal/+page.svelte')

diff --git a/code/app/src/routes/(main)/(public)/portal/+page.svelte b/code/app/src/routes/(main)/(public)/portal/+page.svelte
new file mode 100644
index 0000000..bd6aa15
--- /dev/null
+++ b/code/app/src/routes/(main)/(public)/portal/+page.svelte
@@ -0,0 +1,26 @@
+<script lang="ts">
+    import { onMount } from "svelte";
+    import type { PageData } from "./$types";
+    import type { PortalMessage } from "$configuration";
+    import { goto } from "$app/navigation";
+    import { sgs } from "$help/global-state";
+
+    export let data: PageData;
+
+    onMount(async () => {
+        switch (data.message as PortalMessage) {
+            case "emailValidated": {
+                sgs("showEmailValidatedAlertWhenLoggedIn", true);
+                await goto("/home");
+                break;
+            }
+            default: {
+                await goto("/home");
+            }
+        }
+    });
+</script>
+
+<div class="p-3">
+    <h1>Warping...</h1>
+</div>
-- 
cgit v1.3

