v1.4 - Login fixes, etc

This commit is contained in:
2026-04-27 21:53:36 +12:00
parent 8cf9bfb441
commit c9580ac2eb
33 changed files with 2283 additions and 202 deletions
+15 -1
View File
@@ -1,5 +1,5 @@
import { browser } from '$app/environment';
import { writable } from 'svelte/store';
import { readable, writable } from 'svelte/store';
export type AppSession = {
name: string;
@@ -74,5 +74,19 @@ export function hasStoredAdminSession() {
return getStoredAdminSession() !== null;
}
export const sessionHydrated = readable(false, (set) => {
if (!browser) {
return undefined;
}
const frame = window.requestAnimationFrame(() => {
set(true);
});
return () => {
window.cancelAnimationFrame(frame);
};
});
export const clientSession = createSessionStore(CLIENT_STORAGE_KEY);
export const adminSession = createSessionStore(ADMIN_STORAGE_KEY);