Add Super Viewer read-only administrator role
CI / checks (push) Successful in 5m40s

This commit is contained in:
2026-10-11 23:30:40 -04:00
parent 253d47300c
commit 4ea291d305
48 changed files with 1684 additions and 933 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
import Field from '$ui/components/primitives/Field.svelte';
import Input from '$ui/components/primitives/Input.svelte';
import { onMount } from 'svelte';
import { roleLabels, type AuthUser } from '$lib/auth.js';
import { timeFormat, timeZone, timeZonePersistenceError } from '$ui/stores/time-zone.js';
import { availableTimeZones, DEFAULT_TIME_ZONE } from '$lib/time-zone.js';
let exampleDate = $state<Date | null>(null);
@@ -21,7 +22,7 @@
let signingOut = $state(false);
let error = $state('');
let notice = $state('');
const user = $derived($page.data.user);
const user = $derived<AuthUser | null>($page.data.user ?? null);
async function changePassword(event: SubmitEvent) {
event.preventDefault();
if (busy || signingOut) return;
@@ -88,7 +89,7 @@
<section class="panel identity">
<div>
<h2>{user.displayName}</h2>
<p>@{user.username} · <span class="role">{user.role}</span></p>
<p>@{user.username} · <span class="role">{roleLabels[user.role]}</span></p>
</div>
<Button disabled={busy || signingOut} loading={signingOut} onclick={logout}
>Sign out</Button