add new sveltekit frontend

This commit is contained in:
Sam 2023-03-11 16:54:58 +01:00
commit fc4334932a
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
40 changed files with 3802 additions and 0 deletions

14
frontend/src/lib/store.ts Normal file
View file

@ -0,0 +1,14 @@
import { writable } from "svelte/store";
import { browser } from "$app/environment";
import type { MeUser } from "./api/entities";
export const userStore = writable<MeUser | null>(null);
export const tokenStore = writable<string | null>(null);
let defaultThemeValue = "dark";
const initialThemeValue = browser
? window.localStorage.getItem("pronouns-theme") ?? defaultThemeValue
: defaultThemeValue;
export const themeStore = writable<string>(initialThemeValue);