Implement frontend session routing flow

- Validate and prepare access links in apps/frontend
- Add session, ended, and unauthorized routes with polling
- Copy full public access URLs from the admin links page
This commit is contained in:
user
2026-03-28 19:10:24 +02:00
parent 31a501f75b
commit 92deee1b2e
16 changed files with 392 additions and 119 deletions

View File

@@ -0,0 +1,26 @@
<script lang="ts">
import { browser } from "$app/environment";
const reasonMap: Record<string, string> = {
revoked: "This session was revoked by an administrator.",
expired: "This session expired.",
busy: "The assigned device is not currently available.",
not_found: "This session link could not be found.",
invalid: "This session link is invalid.",
network: "Connection was lost. Please try again.",
unknown: "This session is no longer available.",
};
const reason = browser
? (new URLSearchParams(window.location.search).get("reason") ?? "unknown")
: "unknown";
</script>
<main class="bg-background text-foreground flex min-h-screen items-center justify-center px-6">
<section class="w-full max-w-sm rounded-xl border border-border bg-card p-6 text-center">
<h1 class="text-xl font-semibold">Session ended</h1>
<p class="mt-3 text-sm text-muted-foreground">
{reasonMap[reason] || reasonMap.unknown}
</p>
</section>
</main>