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
+6 -3
View File
@@ -4,6 +4,7 @@
import Field from '$ui/components/primitives/Field.svelte';
import RelativeTime from '$ui/components/RelativeTime.svelte';
import { page } from '$app/stores';
import { canOperate } from '$lib/auth.js';
import { contextHref } from '$lib/navigation-context.js';
import { timeFormat } from '$ui/stores/time-zone.js';
import { onMount } from 'svelte';
@@ -49,6 +50,7 @@
}
let betas = $state<BetaListRow[]>([]);
const editable = $derived(canOperate($page.data?.user?.role));
let loading = $state(true);
let error = $state('');
let tab = $state('active');
@@ -122,7 +124,7 @@
}
onMount(() => {
const query = new URLSearchParams(window.location.search);
if (query.has('artifact') || query.has('pluginId')) {
if (editable && (query.has('artifact') || query.has('pluginId'))) {
void goto('/betas/new' + window.location.search, { replaceState: true });
return;
}
@@ -141,7 +143,7 @@
<svelte:head><title>Betas · Electric Cherry</title></svelte:head>
<div class="page">
<SectionHeader title="Betas">
{#snippet actions()}{#if loading || betas.length || error}<Button
{#snippet actions()}{#if editable && (loading || betas.length || error)}<Button
variant="primary"
href="/betas/new">New beta</Button
>{/if}{/snippet}
@@ -230,7 +232,8 @@
pageNumber = 1;
saveContext();
}}>Clear filters</Button
>{:else}<Button variant="primary" href="/betas/new">New beta</Button
>{:else if editable}<Button variant="primary" href="/betas/new"
>New beta</Button
>{/if}{/snippet}
</EmptyState>
{:else}