Something went wrong. Try again.
A collaborative coding-agent orchestrator for atproto radl.app
Something went wrong. Try again.
Svelte
123456789101112131415161718192021222324252627282930313233343536<script lang="ts"> import { account } from '$lib/auth.svelte.js' import type { Space } from '$lib/space.js' import { ui } from '$lib/ui.svelte.js'
// Why this card cannot be filled in. The card still opens — hiding the button instead would leave // the page with no visible way to do the thing, which is a worse answer to the same question, and // it is the rule the goal and request composers already follow. // // The third reason is the one this step adds, and it is not about credentials at all: a membership // event, a registry entry or an auto-review setting from a non-admin is written, accepted by their // PDS, and then dropped by every materializer that reads it. So it says the write would not count // rather than that it would fail. interface Props { space: Space /** Completes "…to ⟨what⟩": `add a member`, `register a type`. */ what: string /** False when the signer's role is not one the fold trusts for this record. */ allowed?: boolean /** Said when `allowed` is false. Name the rule, not the button. */ denied?: string } const { space, what, allowed = true, denied = '' }: Props = $props()</script>
{#if space.fixture} <p class="hint">The demo is read-only. Open a live space to {what}.</p>{:else if account.status !== 'signed-in'} <p class="hint"> <button class="linkish" type="button" onclick={() => (ui.accountOpen = true)}>Sign in</button> to {what}. </p>{:else if !allowed} <p class="hint">{denied}</p>{/if}