Files
shd.build/src/lib/components/MutationConsequence.svelte
T
JB 2e868d86ff
Validate and deploy production / validate (push) Successful in 18s
Validate and deploy staging / validate (push) Successful in 18s
Validate and deploy production / deploy (push) Successful in 1m1s
Validate and deploy staging / deploy (push) Successful in 28s
feat: refine ISAC design and prepare production deployment
2026-07-26 12:25:47 -04:00

17 lines
862 B
Svelte

<script lang="ts">
import { page } from '$app/state';
let { compact = false }: { compact?: boolean } = $props();
const permissions = $derived((page.data.permissions as string[] | undefined) ?? []);
const can = (permission: string) => permissions.includes('*') || permissions.includes(permission);
const publishesDirectly = $derived(can('data.manage'));
const canSubmit = $derived(publishesDirectly || (can('data.propose') && Boolean(page.data.contributorMode?.enabled)));
</script>
{#if canSubmit}
<p class="mutation-consequence" class:compact class:direct={publishesDirectly} role="note">
<b>{publishesDirectly ? 'DIRECT PUBLISH' : 'OVERSIGHT REVIEW'}</b>
<span>{publishesDirectly ? 'Changes publish immediately and create an audit event.' : 'Saving creates a proposal; live data remains unchanged until Oversight approves it.'}</span>
</p>
{/if}