diff --git a/docs/demo.md b/docs/demo.md index bc59013..961a6d0 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -29,7 +29,8 @@ Turning `demo_signin` off ends every demo session at its next check. Demo sign-in lets in anyone who can reach the page. Use it only on an obs-beacond whose agents are the simulator. The sign-in providers you configure still work beside it, so you can sign in as yourself to change the -demo's settings. +demo's settings. They're folded under **Sign in as yourself**, so visitors +aren't invited to type real credentials into a demo. ## Shape of a demo host diff --git a/web/src/lib/SignIn.svelte b/web/src/lib/SignIn.svelte index 5e5ccbb..f87b402 100644 --- a/web/src/lib/SignIn.svelte +++ b/web/src/lib/SignIn.svelte @@ -20,6 +20,10 @@ const reason = $derived(MESSAGES[page.url.searchParams.get('signin') ?? ''] ?? ''); const back = $derived(page.url.pathname === '/' ? '' : '?return=' + encodeURIComponent(page.url.pathname + page.url.search)); + // On the demo, the ways to sign in as yourself are folded away, so + // visitors aren't invited to type real credentials (#45). + let yourself = $state(false); + const others = $derived(!demo || yourself); const redirects = $derived(providers.filter((p) => p.kind !== 'passkey')); const local = $derived(providers.find((p) => p.kind === 'passkey')); const passkey = $derived(local && local.passkeys !== false ? local : undefined); @@ -90,8 +94,14 @@ {#if demo}
This is the demo: a simulated enterprise of hosts, clusters, VMs, arrays and IBM i, failing in the ways real ones do. Look at anything, setup included; nothing you do changes it.
- + + {#if providers.length && !yourself} + + {:else if providers.length} +{p.note}
{/if} @@ -109,6 +119,7 @@ {/if} + {/if} {#if !providers.length && !demo}No sign-in provider is configured.
{/if} {#if dev}