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
---
 code/app/src/components/button.svelte | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

(limited to 'code/app/src/components/button.svelte')

diff --git a/code/app/src/components/button.svelte b/code/app/src/components/button.svelte
index d573d01..f92be97 100644
--- a/code/app/src/components/button.svelte
+++ b/code/app/src/components/button.svelte
@@ -5,7 +5,7 @@
 
 <script lang="ts">
     import pwKey from "$actions/pwKey";
-    import {SpinnerIcon} from "./icons";
+    import { SpinnerIcon } from "./icons";
 
     export let kind = "primary" as ButtonKind;
     export let size = "md" as ButtonSize;
@@ -75,30 +75,30 @@
 
 {#if href}
     <a
-            use:pwKey={_pwKey}
-            {...shared_props}
-            {href}
-            class="{sizeClasses} {kindClasses} {loading ? 'disabled:' : ''} {$$restProps.class ?? ''} {fullWidth
+        use:pwKey={_pwKey}
+        {...shared_props}
+        {href}
+        class="{sizeClasses} {kindClasses} {loading ? 'disabled:' : ''} {$$restProps.class ?? ''} {fullWidth
             ? 'w-full justify-center'
-            : ''} inline-flex items-center border font-medium rounded shadow-sm focus:outline-none focus:ring-2"
+            : ''} disabled:cursor-not-allowed inline-flex items-center border font-medium rounded shadow-sm focus:outline-none focus:ring-2"
     >
         {#if loading}
-            <SpinnerIcon class={spinnerTextClasses + " " + spinnerMarginClasses}/>
+            <SpinnerIcon class={spinnerTextClasses + " " + spinnerMarginClasses} />
         {/if}
         {text}
     </a>
 {:else}
     <button
-            use:pwKey={_pwKey}
-            {...shared_props}
-            on:click
-            class="btn {sizeClasses} {kindClasses} {$$restProps.class ?? ''}
+        use:pwKey={_pwKey}
+        {...shared_props}
+        on:click
+        class="btn {sizeClasses} {kindClasses} {$$restProps.class ?? ''}
         {fullWidth
             ? 'w-full justify-center'
             : ''} inline-flex items-center border font-medium rounded shadow-sm focus:outline-none focus:ring-2"
     >
         {#if loading}
-            <SpinnerIcon class={spinnerTextClasses + " " + spinnerMarginClasses}/>
+            <SpinnerIcon class={spinnerTextClasses + " " + spinnerMarginClasses} />
         {/if}
         {text}
     </button>
-- 
cgit v1.3

