add shared computer feature

This commit is contained in:
JCEEE
2026-09-14 15:33:07 +01:00
parent 7003609afe
commit e0dd4c0721
15 changed files with 1137 additions and 7 deletions
@@ -0,0 +1,13 @@
import { redirect } from '@sveltejs/kit';
// The fam layout renders the shared-device picker when child sessions exist
// but none is active. With an active session this route just sends you home.
export async function load(event) {
const session = event.locals.user;
if (session) {
const fam = event.params.fam;
if (session.role === 'parent') throw redirect(303, `/${fam}`);
throw redirect(303, `/${fam}/${encodeURIComponent(session.username || '')}`);
}
return {};
}
@@ -0,0 +1,4 @@
<!-- Shared-device profile picker. The fam layout renders the picker itself in
picker mode (no active session, child sessions present) — this page only
exists so /{fam}/switch resolves as a route. -->
<div></div>