[web] Domi UI: the web UI on @domi/ui v1.0.4, vendored (CPAL-1.0), with the Built on Domi credit (PR #14, squashed)

@domi/ui v1.0.4 vendored unchanged in packages/domi-ui by domi-design's tools/vendor.mjs and used as workspace:*, so
the Nix build fetches nothing from Gitea (web.nix sources the folder; fetchPnpmDeps hash from the NixOS runner).
Its fonts, roles (data-domi-room="ianitor", the same hex) and controls replace Ianitor's copies: Button through
Ianitor's adapter (desktop sizes kept), every text field a TextField with its seal, Checkbox, Select, Segmented.
Ianitor's 22 role names renamed to --domi-*. <DomiCredit /> on every screen and in About, with the CPAL section 15
note beside the source link; the README names the vendored package. Disabled buttons are natively disabled.
This commit was merged in pull request #14.
This commit is contained in:
2026-11-23 00:52:19 +01:00
parent 0934bb3419
commit c9aa55ec99
83 changed files with 8528 additions and 396 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ test("Add a host: + Host → fill → Apply = 2 clicks, kept", { annotation: { t
await page.getByLabel("Hostname").pressSequentially("notes.home.test");
await page.getByLabel("Send traffic to").fill("http://192.0.2.60:8080");
await beat(page);
await c.click(page.getByRole("button", { name: "Apply" }));
await c.click(page.getByRole("button", { name: "Apply", exact: true }));
await expect(page.locator("dialog.ia-panel")).toHaveCount(0, { timeout: 10_000 });
await expect(page.getByRole("button", { name: "More for notes.home.test" })).toBeVisible();
await beat(page);
+1 -1
View File
@@ -2,7 +2,7 @@
<!-- SPDX-License-Identifier: CPAL-1.0
- Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
<html lang="en">
<html lang="en" data-domi-room="ianitor">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
+1
View File
@@ -14,6 +14,7 @@
"aula:shots": "playwright test --project=aula"
},
"dependencies": {
"@domi/ui": "workspace:*",
"@ianitor/ui": "workspace:*"
},
"devDependencies": {
+19 -18
View File
@@ -5,6 +5,7 @@
// The shell (handoff §2.16): sidebar on desktop, top and bottom bars on phone, the routes,
// the banners every screen starts with, toasts and the signed-out dialog (§10).
import { onMount } from "svelte";
import { DomiCredit } from "@domi/ui";
import { Button, Dialog, Icon } from "@ianitor/ui";
import type { IconName } from "@ianitor/ui";
import EngineChip from "./components/EngineChip.svelte";
@@ -12,7 +13,6 @@
import TopBanners from "./components/TopBanners.svelte";
import { app, navigate, refresh, startPolling } from "./lib/app.svelte";
import { remembered } from "./lib/applies";
import { CREDIT } from "./lib/credit";
import Certificates from "./views/Certificates.svelte";
import History from "./views/History.svelte";
import Hosts from "./views/Hosts.svelte";
@@ -94,7 +94,7 @@
{#if route.view === "signed-in"}
<SignedIn />
{:else}
<a class="skip domi-btn" href="#main">Skip to content</a>
<a class="skip ia-link" href="#main">Skip to content</a>
<div class="shell">
<nav class="sidebar" aria-label="Main">
<div class="ia-wordmark brand">IANITOR DOMI</div>
@@ -104,8 +104,8 @@
<div class="foot ia-muted">
<p>{viewer?.via === "authelia" ? `Signed in as ${viewer.name} through Authelia` : viewer ? `Using the API token "${viewer.name}"` : "Signed in through Authelia"}</p>
<p>Control on 127.0.0.1 only</p>
{#if app.overview?.site?.auth_logout_url}<a class="domi-btn link" href={app.overview.site.auth_logout_url}>Sign out</a>{/if}
<p class="credit"><a href={CREDIT.url} rel="noreferrer">{CREDIT.phrase}</a> · {CREDIT.notice}</p>
{#if app.overview?.site?.auth_logout_url}<a class="ia-link" href={app.overview.site.auth_logout_url}>Sign out</a>{/if}
<div class="credit"><DomiCredit /></div>
</div>
</nav>
<header class="topbar"><span class="ia-wordmark">IANITOR DOMI</span>{#if app.phone}<EngineChip />{/if}</header>
@@ -122,7 +122,7 @@
{:else if route.view === "settings"}
<Settings tab={route.tab} />
{/if}
<p class="credit phone-credit ia-muted"><a href={CREDIT.url} rel="noreferrer">{CREDIT.phrase}</a> · {CREDIT.notice}</p>
<div class="credit phone-credit"><DomiCredit /></div>
</main>
<nav class="bottombar" aria-label="Main">
{#each NAV as n (n.href)}
@@ -155,28 +155,29 @@
<style>
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--colonnade); border-right: 1px solid var(--hairline); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; }
.sidebar { background: var(--domi-chrome); border-right: 1px solid var(--domi-line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; }
.brand { padding: 4px 10px 18px; }
.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: var(--fs-nav); text-decoration: none; border: 1px solid transparent; }
.nav:hover { background: var(--surface); color: var(--text); }
.nav[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: var(--inset-lit); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.nav[aria-current="page"] :global(svg) { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--domi-fg-2); font-weight: 600; font-size: var(--fs-nav); text-decoration: none; border: 1px solid transparent; }
.nav:hover { background: var(--domi-panel); color: var(--domi-fg); }
.nav[aria-current="page"] { background: var(--domi-hover); color: var(--domi-fg); box-shadow: var(--inset-lit); border-color: color-mix(in srgb, var(--domi-accent) 30%, transparent); }
.nav[aria-current="page"] :global(svg) { color: var(--domi-accent); }
.foot { margin-top: auto; font-size: 0.82rem; display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
main { padding: var(--main-pad); display: flex; flex-direction: column; gap: 18px; min-width: 0; outline: none; }
.topbar, .bottombar, .phone-credit { display: none; }
/* LICENSE, Exhibit B (CPAL §14): on every screen, in the sidebar or, on a phone, at the foot of the page. */
/* LICENSE Exhibit B, Ianitor's and @domi/ui's (the same words; CPAL §14): on every screen, in the sidebar or, on a
phone, at the foot of the page. <DomiCredit /> renders it exactly. */
.credit { margin-top: 6px; font-size: 0.78rem; }
.credit a { color: var(--accent); }
.sidebar .credit :global(.domi-credit) { justify-content: flex-start; }
@media (max-width: 719.98px) {
.shell { grid-template-columns: minmax(0, 1fr); }
.sidebar { display: none; }
.phone-credit { display: block; margin-top: auto; text-align: center; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: var(--colonnade); border-bottom: 1px solid var(--hairline); padding: 10px 16px; }
.phone-credit { display: block; margin-top: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: var(--domi-chrome); border-bottom: 1px solid var(--domi-line); padding: 10px 16px; }
.topbar .ia-wordmark { font-size: 12px; letter-spacing: 0.26em; }
main { padding: 18px 16px calc(90px + env(safe-area-inset-bottom)); gap: 14px; }
.bottombar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--colonnade); border-top: 1px solid var(--hairline); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); z-index: 40; }
.bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--phone-bar-h); border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: var(--fs-tab-phone); text-decoration: none; }
.bottombar a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.bottombar a[aria-current="page"] :global(svg) { color: var(--accent); }
.bottombar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--domi-chrome); border-top: 1px solid var(--domi-line); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); z-index: 40; }
.bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--phone-bar-h); border-radius: var(--radius-sm); color: var(--domi-fg-2); font-weight: 600; font-size: var(--fs-tab-phone); text-decoration: none; }
.bottombar a[aria-current="page"] { background: var(--domi-hover); color: var(--domi-fg); }
.bottombar a[aria-current="page"] :global(svg) { color: var(--domi-accent); }
}
</style>
+6 -6
View File
@@ -69,12 +69,12 @@
<style>
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: center; }
.steps li.pending { color: var(--muted); }
.steps li.running { color: var(--text); }
.steps li.running :global(svg) { color: var(--accent); }
.steps li.done { color: var(--text-2); }
.steps li.pending { color: var(--domi-muted); }
.steps li.running { color: var(--domi-fg); }
.steps li.running :global(svg) { color: var(--domi-accent); }
.steps li.done { color: var(--domi-fg-2); }
.steps li.done :global(svg) { color: var(--kept); }
.steps li.failed :global(svg) { color: var(--down); }
.steps li.skipped { color: var(--muted); }
.hollow { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); margin: 2px; }
.steps li.skipped { color: var(--domi-muted); }
.hollow { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--domi-muted); margin: 2px; }
</style>
+2 -2
View File
@@ -136,7 +136,7 @@
<Progress label="Health watch" max={total} now={total - watchLeft} text="{watchLeft} seconds left" />
{/if}
</div>
{#if active.state === "queued"}<Button onclick={() => cancel(active.id)}>Cancel</Button>{:else}<button type="button" class="domi-btn link" onclick={() => onshowsteps(active.id)}>Show steps</button>{/if}
{#if active.state === "queued"}<Button onclick={() => cancel(active.id)}>Cancel</Button>{:else}<button type="button" class="ia-link" onclick={() => onshowsteps(active.id)}>Show steps</button>{/if}
{:else if last}
<div class="grow">
{#if last.state === "kept"}
@@ -161,5 +161,5 @@
{/if}
<style>
.warn { color: var(--degraded); }
.warn { color: var(--domi-warning); }
</style>
+1 -1
View File
@@ -117,5 +117,5 @@
</Dialog>
<style>
ul { margin: 6px 0 0; padding-left: 1.1rem; color: var(--text-2); }
ul { margin: 6px 0 0; padding-left: 1.1rem; color: var(--domi-fg-2); }
</style>
+2 -2
View File
@@ -116,7 +116,7 @@
{#if h.certificate.state === "pending"}<span class="ia-sub" style="display:block">Waiting for Let's Encrypt to issue the certificate.</span>{/if}
{#if h.certificate.state === "failed"}
<span class="ia-sub" style="display:block;color:var(--down)">Let's Encrypt could not confirm <strong>{h.hostname}</strong>. The name must point to this server, and port 80 must be open from the internet.
<button type="button" class="domi-btn link" onclick={() => onretry(h.hostname)}>Try again</button></span>
<button type="button" class="ia-link" onclick={() => onretry(h.hostname)}>Try again</button></span>
{/if}
</span>
<span role="cell">
@@ -133,7 +133,7 @@
<style>
.phone, .phone-dot { display: none; }
.problem { color: var(--text-2) !important; }
.problem { color: var(--domi-fg-2) !important; }
@media (max-width: 719.98px) {
.desktop { display: none !important; }
.phone { display: block; padding-left: 22px; }
+71 -58
View File
@@ -5,6 +5,7 @@
// Handoff §6 and §7: the add/edit panel, its validation on blur, Apply, and the progress and
// outcome of the apply it starts. Every decision comes from control; the form only carries it.
import { onDestroy, onMount } from "svelte";
import { Checkbox, Select, TextField } from "@domi/ui";
import { Banner, Button, Details, Dialog, Icon, Segmented } from "@ianitor/ui";
import ApplyProgress from "./ApplyProgress.svelte";
import { ApiError, call, del, get, newKey, sentence } from "../lib/api";
@@ -60,6 +61,24 @@
let idem = newKey();
let lastBody = "";
// Every text field carries its seal (domi-design TextField): `next` moves to the next field, and the last text
// field of the form applies it, as the Apply button does. The last one depends on what is shown.
const lastField = $derived.by(() => {
const keys = ["hostname", ...host.upstreams.map((_, i) => `upstreams[${i}]`)];
if (more) {
if (host.hc) keys.push("health_check.path");
for (const [list, rules, secrets] of [["request_headers", host.req, true], ["response_headers", host.resp, false]] as const) {
rules.forEach((r, i) => {
keys.push(`${list}[${i}].name`);
if (r.action === "set" && !(secrets && r.kind === "secret")) keys.push(`${list}[${i}].value`);
});
}
}
return keys.at(-1);
});
const seal = (key: string) =>
key === lastField ? { action: "save" as const, actionLabel: "Apply this host" } : { action: "next" as const, actionLabel: undefined };
// ---- the apply
let apply = $state<ApplyView | null>(null);
let restoring = $state(false);
@@ -392,43 +411,36 @@
{#if topError.body.detail}<Details detail={topError.body.detail} reference={topError.requestId} />{/if}
{/if}
<div class="domi-field">
<label class="domi-field-label" for={fieldId("hostname")}>Hostname</label>
<input id={fieldId("hostname")} class="domi-input" bind:value={host.hostname} readonly={!!hostname}
autocapitalize="none" spellcheck="false" inputmode="url" autocomplete="off"
aria-invalid={errAt("hostname") && touched["hostname"] ? "true" : undefined}
aria-describedby="{fieldId('hostname')}-e {fieldId('hostname')}-h" onblur={() => blur("hostname")} />
{#if errAt("hostname") && touched["hostname"]}
<p class="domi-error" id="{fieldId('hostname')}-e"><Icon name="ring" />{errAt("hostname").message}
{#if errAt("hostname").params?.suggestion}
<button type="button" class="domi-btn link" onclick={() => { host.hostname = errAt("hostname").params.suggestion; blur("hostname"); }}>Use {errAt("hostname").params.suggestion}</button>
{/if}
</p>
<div class="ia-field" onfocusout={() => blur("hostname")}>
<TextField id={fieldId("hostname")} label="Hostname" bind:value={host.hostname} readonly={!!hostname}
spellcheck={false} inputmode="url" autocomplete="off" {...seal("hostname")}
error={errAt("hostname") && touched["hostname"] ? errAt("hostname").message : undefined}
hint={hostname ? "To use another address, add a new host and remove this one." : undefined} />
{#if errAt("hostname") && touched["hostname"] && errAt("hostname").params?.suggestion}
<div><button type="button" class="ia-link" onclick={() => { host.hostname = errAt("hostname").params.suggestion; blur("hostname"); }}>Use {errAt("hostname").params.suggestion}</button></div>
{/if}
{#if hostname}<p class="ia-hint" id="{fieldId('hostname')}-h">To use another address, add a new host and remove this one.</p>{/if}
</div>
{#each host.upstreams as _, i (i)}
{@const f = `upstreams[${i}]`}
{@const err = errAt(f) ?? (i === 0 ? errAt("upstreams") : undefined)}
<div class="domi-field">
{#if i === 0}<label class="domi-field-label" for={fieldId(f)}>Send traffic to</label>{/if}
{@const shown = err && (touched[f] || touched["upstreams"])}
<div class="ia-field" onfocusout={() => blur(f)}>
<div class="row">
<input id={fieldId(f)} class="domi-input" bind:value={host.upstreams[i]} autocapitalize="none" spellcheck="false" inputmode="url" autocomplete="off"
aria-label={i === 0 ? undefined : `Also send traffic to, address ${i + 1}`}
aria-invalid={err && (touched[f] || touched["upstreams"]) ? "true" : undefined}
aria-describedby="{fieldId(f)}-e" onblur={() => blur(f)} />
<div class="grow">
<TextField id={fieldId(f)} label={i === 0 ? "Send traffic to" : `Also send traffic to, address ${i + 1}`} hideLabel={i > 0}
bind:value={host.upstreams[i]} spellcheck={false} inputmode="url" autocomplete="off" {...seal(f)}
error={shown ? err.message : undefined}
hint={i === 0 && host.upstreams.length === 1 ? "Add another address later for a second server." : undefined} />
</div>
{#if i > 0}<button type="button" class="ia-icon-btn" aria-label="Remove this address" onclick={() => host.upstreams.splice(i, 1)}><Icon name="trash" /></button>{/if}
</div>
{#if err && (touched[f] || touched["upstreams"])}
<p class="domi-error" id="{fieldId(f)}-e"><Icon name="ring" />{err.message}
{#if err.params?.suggestion}<button type="button" class="domi-btn link" onclick={() => { host.upstreams[i] = err.params.suggestion; blur(f); }}>Use {err.params.suggestion}</button>{/if}
</p>
{#if shown && err.params?.suggestion}
<div><button type="button" class="ia-link" onclick={() => { host.upstreams[i] = err.params.suggestion; blur(f); }}>Use {err.params.suggestion}</button></div>
{/if}
{#if i === 0 && host.upstreams.length === 1}<p class="ia-hint">Add another address later for a second server.</p>{/if}
</div>
{/each}
<div><button type="button" class="domi-btn link" onclick={() => host.upstreams.push("")}>Add another address</button></div>
<div><button type="button" class="ia-link" onclick={() => host.upstreams.push("")}>Add another address</button></div>
<Segmented legend="Certificate" name="tls" bind:value={host.tls}
options={[{ value: "domi", label: "Domi certificate" }, { value: "letsencrypt", label: "Let's Encrypt" }]} />
@@ -437,77 +449,77 @@
<Segmented legend="Who can open it" name="auth" bind:value={host.auth} disabled={signinOk ? [] : ["forward-auth"]}
options={[{ value: "forward-auth", label: "Sign in first" }, { value: "none", label: "Anyone" }]} />
{#if !signinOk}<p class="ia-hint">Sign-in is not set up on this server yet, so choose Anyone for now. To set it up, add the Authelia address to ianitor.toml in the routes repository.</p>{/if}
{#if errAt("auth")}<p class="domi-error"><Icon name="ring" />{errAt("auth").message}</p>{/if}
{#if errAt("auth")}<p class="ia-error"><Icon name="ring" />{errAt("auth").message}</p>{/if}
<div>
<button type="button" class="domi-btn link" aria-expanded={more} aria-controls="more-options" onclick={() => (more = !more)}>
<button type="button" class="ia-link" aria-expanded={more} aria-controls="more-options" onclick={() => (more = !more)}>
More options: headers, websockets, health check, share links, visit log
</button>
</div>
{#if more}
<div id="more-options" class="more">
<div class="domi-field">
<span class="domi-field-label">Health check</span>
<label class="ia-check"><input type="checkbox" bind:checked={host.hc} /> Check that it answers</label>
<div class="ia-field">
<span class="ia-field-label">Health check</span>
<Checkbox bind:checked={host.hc} label="Check that it answers" />
<p class="ia-hint">Ianitor asks this address regularly and shows the result on the main screen.</p>
</div>
{#if host.hc}
<div class="domi-field">
<label class="domi-field-label" for={fieldId("health_check.path")}>Health check address</label>
<input id={fieldId("health_check.path")} class="domi-input" bind:value={host.hcPath} aria-invalid={errAt("health_check.path") ? "true" : undefined} onblur={() => blur("health_check.path")} />
{#if errAt("health_check.path")}<p class="domi-error"><Icon name="ring" />{errAt("health_check.path").message}</p>{/if}
<p class="ia-hint">Use an address that answers without signing in, like /health.</p>
<div class="ia-field" onfocusout={() => blur("health_check.path")}>
<TextField id={fieldId("health_check.path")} label="Health check address" bind:value={host.hcPath} spellcheck={false}
autocomplete="off" {...seal("health_check.path")} error={errAt("health_check.path")?.message}
hint="Use an address that answers without signing in, like /health." />
</div>
<div class="domi-field">
<label class="domi-field-label" for={fieldId("health_check.interval_secs")}>Checks every</label>
<div class="row"><input id={fieldId("health_check.interval_secs")} class="domi-input narrow" type="number" min="1" max="3600" bind:value={host.hcEvery} onblur={() => blur("health_check.interval_secs")} /> <span class="ia-text2">seconds</span></div>
{#if errAt("health_check.interval_secs")}<p class="domi-error"><Icon name="ring" />{errAt("health_check.interval_secs").message}</p>{/if}
<div class="ia-field">
<label class="ia-field-label" for={fieldId("health_check.interval_secs")}>Checks every</label>
<div class="row"><input id={fieldId("health_check.interval_secs")} class="ia-input narrow" type="number" min="1" max="3600" bind:value={host.hcEvery} onblur={() => blur("health_check.interval_secs")} /> <span class="ia-text2">seconds</span></div>
{#if errAt("health_check.interval_secs")}<p class="ia-error"><Icon name="ring" />{errAt("health_check.interval_secs").message}</p>{/if}
</div>
{/if}
<div class="domi-field">
<span class="domi-field-label">Websockets</span>
<label class="ia-check"><input type="checkbox" bind:checked={host.websockets} /> Allow websockets</label>
<div class="ia-field">
<span class="ia-field-label">Websockets</span>
<Checkbox bind:checked={host.websockets} label="Allow websockets" />
<p class="ia-hint">Live updates for apps like Home Assistant. Leave on unless you know the app does not need them.</p>
</div>
<div class="domi-field">
<span class="domi-field-label">Share links</span>
<label class="ia-check"><input type="checkbox" bind:checked={host.share_links} /> Allow share links</label>
<div class="ia-field">
<span class="ia-field-label">Share links</span>
<Checkbox bind:checked={host.share_links} label="Allow share links" />
<p class="ia-hint">Lets you make links that open this host without signing in, until they expire.</p>
{#if shareWarning}<p class="ia-hint">Anyone can already open {name}, so a share link changes nothing.</p>{/if}
</div>
<div class="domi-field">
<span class="domi-field-label">Device certificates</span>
<label class="ia-check"><input type="checkbox" bind:checked={host.device_certs} /> Only devices with a Domi device certificate</label>
<div class="ia-field">
<span class="ia-field-label">Device certificates</span>
<Checkbox bind:checked={host.device_certs} label="Only devices with a Domi device certificate" />
<p class="ia-hint">Phones, computers and apps need a certificate from Certificates before they can open it.</p>
</div>
<Segmented legend="Visit log" name="access_log" bind:value={host.access_log} options={[{ value: "off", label: "Off" }, { value: "truncated", label: "On" }]} />
<p class="ia-hint">On keeps a log on this server, with visitor addresses shortened.</p>
{#each [{ list: "request_headers", rules: host.req, title: "Header rules sent to your service", secrets: true }, { list: "response_headers", rules: host.resp, title: "Header rules sent back to visitors", secrets: false }] as group (group.list)}
<div class="domi-field">
<span class="domi-field-label">{group.title}</span>
<div class="ia-field">
<span class="ia-field-label">{group.title}</span>
{#each group.rules as r, i (i)}
{@const p = `${group.list}[${i}]`}
<div class="rule ia-card">
<Segmented legend="Rule {i + 1}" name="{p}-action" bind:value={r.action} options={[{ value: "set", label: "Set" }, { value: "remove", label: "Remove" }]} />
<label class="domi-field-label" for={fieldId(p + ".name")}>Header name</label>
<input id={fieldId(p + ".name")} class="domi-input" bind:value={r.name} onblur={() => blur(p + ".name")} />
<div onfocusout={() => blur(p + ".name")}>
<TextField id={fieldId(p + ".name")} label="Header name" bind:value={r.name} spellcheck={false} autocomplete="off" {...seal(p + ".name")} />
</div>
{#if r.action === "set"}
{#if group.secrets}
<Segmented legend="Value" name="{p}-kind" bind:value={r.kind} disabled={(site?.secrets.length ?? 0) === 0 ? ["secret"] : []} options={[{ value: "value", label: "Fixed value" }, { value: "secret", label: "Secret" }]} />
{/if}
{#if r.kind === "secret" && group.secrets}
<select class="domi-input" bind:value={r.secret} aria-label="Secret">
{#each site?.secrets ?? [] as s (s)}<option value={s}>{s}</option>{/each}
</select>
<Select label="Secret" bind:value={r.secret} options={(site?.secrets ?? []).map((s) => ({ value: s, label: s }))} />
{:else}
<input class="domi-input" bind:value={r.value} aria-label="Value" onblur={() => blur(p + ".value")} />
<div onfocusout={() => blur(p + ".value")}>
<TextField label="Value" hideLabel bind:value={r.value} spellcheck={false} autocomplete="off" {...seal(p + ".value")} />
</div>
{/if}
{/if}
{#each Object.entries(errors).filter(([k]) => k.startsWith(p)) as [, e] (e.code + e.field)}<p class="domi-error"><Icon name="ring" />{e.message}</p>{/each}
{#each Object.entries(errors).filter(([k]) => k.startsWith(p)) as [, e] (e.code + e.field)}<p class="ia-error"><Icon name="ring" />{e.message}</p>{/each}
<button type="button" class="ia-icon-btn" aria-label="Remove this rule" onclick={() => group.rules.splice(i, 1)}><Icon name="trash" /></button>
</div>
{/each}
<div><button type="button" class="domi-btn link" onclick={() => group.rules.push({ action: "set", name: "", kind: "value", value: "", secret: site?.secrets[0] ?? "" })}>Add a rule</button></div>
<div><button type="button" class="ia-link" onclick={() => group.rules.push({ action: "set", name: "", kind: "value", value: "", secret: site?.secrets[0] ?? "" })}>Add a rule</button></div>
{#if group.secrets && (site?.secrets.length ?? 0) === 0}<p class="ia-hint">No secrets are listed in ianitor.toml.</p>{/if}
</div>
{/each}
@@ -531,6 +543,7 @@
<style>
form { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.more { display: flex; flex-direction: column; gap: 16px; }
.rule { display: flex; flex-direction: column; gap: 8px; }
.narrow { max-width: 8rem; }
+21 -16
View File
@@ -7,6 +7,7 @@
// Links off: "Turn on share links" applies the change, then Copy link (4 clicks: open
// question Q1 is not decided, so this is the fallback path the design allows).
import { onDestroy, onMount } from "svelte";
import { DomiError, TextField } from "@domi/ui";
import { Banner, Button, Dialog, Icon, Segmented } from "@ianitor/ui";
import ApplyProgress from "./ApplyProgress.svelte";
import { ApiError, call, del, newKey, patch, sentence } from "../lib/api";
@@ -64,6 +65,12 @@
}
}
// The seals of the two fields (domi-design TextField): a new link with this prefix or password, or the reason not.
async function remint(field: "path_prefix" | "password") {
await mint();
if (fieldErr?.field === field) throw new DomiError(fieldErr.message);
}
async function copy() {
if (!link) return;
try {
@@ -111,7 +118,7 @@
{:else}
<p><strong>Share links are off for {hostname}.</strong></p>
<p class="ia-text2">Turning them on is a change to the host, checked like any other.</p>
{#if problem}<p class="domi-error" role="alert"><Icon name="ring" />{problem}</p>{/if}
{#if problem}<p class="ia-error" role="alert"><Icon name="ring" />{problem}</p>{/if}
<div><Button variant="outline" onclick={turnOn} disabled={!!app.overview?.paused}>Turn on share links</Button></div>
{/if}
{:else}
@@ -130,34 +137,32 @@
<p class="ia-status" data-s="kept" role="status"><Icon name="check" /><span>Copied</span></p>
<p class="ia-hint">Expires on {longDate(link?.expires_at)}. To stop it sooner: Settings, Share links, Stop this link.</p>
{:else}
<Button variant="primary" full icon="copy" onclick={copy} disabled={!link || minting} data-autofocus>Copy link</Button>
<Button variant="primary" full icon="copy" onclick={copy} pending={minting || (!link && !problem && !fieldErr)} disabled={!link && !minting && !!(problem || fieldErr)} data-autofocus>Copy link</Button>
{/if}
{#if refused}<p class="ia-hint" role="alert">Your browser did not allow copying. Press Ctrl+C to copy the selected link.</p>{/if}
{#if copiedBefore && !copied}<p class="ia-hint">The link you copied before is stopped. Copy this one.</p>{/if}
<Segmented legend="Expires after" name="expiry" bind:value={days} onchange={() => mint()}
options={[{ value: "1", label: "1 day" }, { value: "7", label: "7 days" }, { value: "30", label: "30 days" }]} />
<div class="domi-field">
<label class="domi-field-label" for="share-prefix">Only addresses starting with</label>
<input id="share-prefix" class="domi-input" bind:value={prefix} onblur={() => mint()} onkeydown={(e) => { if (e.key === "Enter") { e.preventDefault(); void mint(); } }}
aria-invalid={fieldErr?.field === "path_prefix" ? "true" : undefined} />
{#if fieldErr?.field === "path_prefix"}<p class="domi-error"><Icon name="ring" />{fieldErr.message}</p>{/if}
<p class="ia-hint">/ shares the whole site. Try /share/summer-2026 for one album.</p>
<div class="ia-field" onfocusout={(e) => { if (!e.currentTarget.contains(e.relatedTarget as Node | null)) void mint(); }}>
<TextField id="share-prefix" label="Only addresses starting with" bind:value={prefix} spellcheck={false} autocomplete="off"
action="save" actionLabel="Make the link for these addresses" onsend={() => remint("path_prefix")}
error={fieldErr?.field === "path_prefix" ? fieldErr.message : undefined}
hint="/ shares the whole site. Try /share/summer-2026 for one album." />
</div>
{#if usingPassword}
<p class="ia-hint">This link asks for the password.</p>
<div><button type="button" class="domi-btn link" onclick={() => { usingPassword = false; password = ""; void mint(); }}>Remove the password</button></div>
<div><button type="button" class="ia-link" onclick={() => { usingPassword = false; password = ""; void mint(); }}>Remove the password</button></div>
{:else if showPassword}
<div class="domi-field">
<label class="domi-field-label" for="share-password">Password</label>
<input id="share-password" class="domi-input" type="password" autocomplete="new-password" bind:value={password}
aria-invalid={fieldErr?.field === "password" ? "true" : undefined} />
{#if fieldErr?.field === "password"}<p class="domi-error"><Icon name="ring" />{fieldErr.message}</p>{/if}
<p class="ia-hint">At least 8 characters. Send it to them separately.</p>
<div class="ia-field">
<TextField id="share-password" label="Password" type="password" autocomplete="new-password" bind:value={password}
action="save" actionLabel="Ask for this password on the link" onsend={() => { usingPassword = true; return remint("password"); }}
error={fieldErr?.field === "password" ? fieldErr.message : undefined}
hint="At least 8 characters. Send it to them separately." />
<div><Button onclick={() => { usingPassword = true; void mint(); }}>Use this password</Button></div>
</div>
{:else}
<div><button type="button" class="domi-btn link" onclick={() => (showPassword = true)}>Add a password</button></div>
<div><button type="button" class="ia-link" onclick={() => (showPassword = true)}>Add a password</button></div>
{/if}
{/if}
</Dialog>
+4 -3
View File
@@ -3,9 +3,10 @@
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
/**
* The attribution of LICENSE, Exhibit B. CPAL §14 asks for it on the interface a user reaches the code through,
* and §15 counts use over a network: every screen of the web UI shows it (the sidebar, or the page foot on a phone),
* and Settings, About shows it in full.
* The Attribution Information of LICENSE, Exhibit B: Ianitor's credit, word for word the same as @domi/ui's
* (DOMI_ATTRIBUTION; tests/demo.test.ts checks they match). The web UI shows it through <DomiCredit /> on every
* screen (CPAL §14; §15 counts use over a network). Kept here as plain data for the e2e real-data check, which
* runs in Node and leaves out exactly these words.
*/
export const CREDIT = {
phrase: "Built on Domi",
+3
View File
@@ -2,6 +2,9 @@
// Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
// The styles, once: @domi/ui (the Domi faces, the roles with Ianitor's values from data-domi-room="ianitor" on
// <html>, the controls), then Ianitor's own tokens and components on top.
import "@domi/ui/domi.css";
import "@ianitor/ui/tokens.css";
import "@ianitor/ui/components.css";
import { mount } from "svelte";
+6 -8
View File
@@ -6,6 +6,7 @@
// the install (the accepted 4th click). Until Custos can approve, approval is the server
// command control names (docs/pki.md).
import { onDestroy, onMount } from "svelte";
import { TextField } from "@domi/ui";
import { Banner, Button, Dialog, Icon, Segmented, Status } from "@ianitor/ui";
import HostMenu from "../components/HostMenu.svelte";
import IntermediateBanner from "../components/IntermediateBanner.svelte";
@@ -184,12 +185,9 @@
<Dialog title="New device certificate" kind="panel" onclose={closeForm}>
{#if !request}
<form id="device-form" onsubmit={issue} class="form">
<div class="domi-field">
<label class="domi-field-label" for="device-name">Device name</label>
<input id="device-name" class="domi-input" bind:value={name} autocomplete="off" aria-invalid={nameErr ? "true" : undefined} aria-describedby="device-name-h" />
{#if nameErr}<p class="domi-error"><Icon name="ring" />{nameErr}</p>{/if}
<p class="ia-hint" id="device-name-h">Shown in this list and inside the certificate.</p>
</div>
<TextField id="device-name" label="Device name" bind:value={name} autocomplete="off" action="send"
actionLabel="Request the certificate" clearOnSend={false} error={nameErr ?? undefined}
hint="Shown in this list and inside the certificate." />
<Segmented legend="What is it" name="kind" bind:value={kind} options={[{ value: "phone", label: "Phone or tablet" }, { value: "computer", label: "Computer" }, { value: "app", label: "Domi app" }]} />
<p class="ia-hint">{#if capped}Valid until {until}, when the Domi intermediate certificate ends (renew it to issue for a full year).{:else}Valid for {lifetime} days, until {until}.{/if} It lets this device into hosts that ask for a Domi device certificate.</p>
</form>
@@ -245,8 +243,8 @@
<style>
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.devices { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.devices li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 56px; padding: 6px 10px 6px 16px; border-top: 1px solid var(--hairline); }
.devices { list-style: none; margin: 0; padding: 0; border: 1px solid var(--domi-line); border-radius: var(--radius-lg); }
.devices li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 56px; padding: 6px 10px 6px 16px; border-top: 1px solid var(--domi-line); }
.devices li:first-child { border-top: 0; }
.dname { font-weight: 600; flex: 1 1 140px; }
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-basis: 100%; }
+5 -5
View File
@@ -98,7 +98,7 @@
</script>
<h1 class="ia-display">{host ? `History of ${host}` : "History"}</h1>
{#if host}<div><button type="button" class="domi-btn link" onclick={() => navigate("/history")}>Show all changes</button></div>{/if}
{#if host}<div><button type="button" class="ia-link" onclick={() => navigate("/history")}>Show all changes</button></div>{/if}
{#if problem}<Banner tone="notice" live="status">{#snippet title()}{problem}{/snippet}</Banner>{/if}
<div class="cols">
@@ -168,11 +168,11 @@
.cols { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.list { flex: 1 1 360px; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--text); text-align: left; cursor: pointer; }
.entry:hover { background: var(--surface); }
.entry[aria-current="true"] { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--domi-fg); text-align: left; cursor: pointer; }
.entry:hover { background: var(--domi-panel); }
.entry[aria-current="true"] { background: var(--domi-hover); border-color: color-mix(in srgb, var(--domi-accent) 55%, transparent); }
.sum { font-weight: 600; }
.detail { flex: 2 1 360px; background: var(--colonnade); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.detail { flex: 2 1 360px; background: var(--domi-chrome); border: 1px solid var(--domi-line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.detail ul { margin: 0; padding-left: 1.1rem; }
.buttons { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
</style>
+1 -1
View File
@@ -112,7 +112,7 @@
Routes live in the {o.repo.name} repository, one file per host.
{#if o.repo.last_push_at}Last pushed to Gitea {atTime(o.repo.last_push_at, app.now)}.{/if}
{#if o.repo.unpushed}{o.repo.unpushed} changes not yet pushed.{/if}
<button type="button" class="domi-btn link" onclick={() => navigate("/history")}>See history</button>
<button type="button" class="ia-link" onclick={() => navigate("/history")}>See history</button>
</p>
{/if}
+10 -11
View File
@@ -4,6 +4,7 @@
<script lang="ts">
// Handoff §13.6: signing the intermediate by hand on the offline computer (the temporary step
// until Custos can sign, docs/pki.md). The root key never comes to this server.
import { TextField } from "@domi/ui";
import { Banner, Button, Icon } from "@ianitor/ui";
import { ApiError, post, put, sentence } from "../lib/api";
import { app, navigate, refresh } from "../lib/app.svelte";
@@ -120,24 +121,22 @@
<p class="ia-label">Step 3</p>
<h2 class="ia-h3">Upload the signed certificate</h2>
{#if paste}
<div class="domi-field">
<label class="domi-field-label" for="cert-paste">Signed certificate</label>
<textarea id="cert-paste" class="domi-input" rows="8" bind:value={pem} aria-invalid={err ? "true" : undefined}></textarea>
</div>
<TextField id="cert-paste" label="Signed certificate" multiline rows={8} enterSends="never" spellcheck={false} bind:value={pem}
action="send" actionLabel="Use the pasted certificate" clearOnSend={false} onsend={() => { void use(); }} />
{:else}
<div class="domi-field">
<label class="domi-field-label" for="cert-file">Signed certificate (.crt)</label>
<input id="cert-file" class="domi-input" type="file" accept=".crt,.pem" onchange={file} aria-invalid={err ? "true" : undefined} />
<div><button type="button" class="domi-btn link" onclick={() => (paste = true)}>Paste it instead</button></div>
<div class="ia-field">
<label class="ia-field-label" for="cert-file">Signed certificate (.crt)</label>
<input id="cert-file" class="ia-input" type="file" accept=".crt,.pem" onchange={file} aria-invalid={err ? "true" : undefined} />
<div><button type="button" class="ia-link" onclick={() => (paste = true)}>Paste it instead</button></div>
</div>
{/if}
{#if err}<p class="domi-error" role="alert"><Icon name="ring" />{err}</p>{/if}
{#if err}<p class="ia-error" role="alert"><Icon name="ring" />{err}</p>{/if}
<div><Button variant="primary" onclick={use} {pending} disabled={!pem.includes("BEGIN CERTIFICATE")}>Use this certificate</Button></div>
</section>
{/if}
<style>
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.step { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.fp { word-break: break-all; color: var(--accent-strong); }
.step { border: 1px solid var(--domi-line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.fp { word-break: break-all; color: var(--domi-accent-strong); }
</style>
+31 -25
View File
@@ -5,11 +5,11 @@
// Handoff §8.3: Settings with General, API (⚙ → API → New token = 3 clicks, Copy token the
// accepted 4th), Share links and About.
import { onMount } from "svelte";
import { DomiCredit, DomiError, TextField } from "@domi/ui";
import { Banner, Button, Dialog, Segmented } from "@ianitor/ui";
import { ApiError, call, del, get, newKey, patch, post, sentence } from "../lib/api";
import { app, navigate, toast } from "../lib/app.svelte";
import { longDate, shortDate, whenInline } from "../lib/format";
import { CREDIT } from "../lib/credit";
import type { CreatedToken, ShareLink, TokenRow } from "../lib/types";
let { tab }: { tab: string } = $props();
@@ -93,23 +93,30 @@
}
}
// Renames the new token now (its field's seal) or when the dialog closes. False when the name was refused.
async function rename(): Promise<boolean> {
if (!made || !tokenName.trim() || tokenName.trim() === made.name) return true;
nameErr = null;
try {
await patch(`/tokens/${encodeURIComponent(made.id)}`, { name: tokenName.trim() });
made.name = tokenName.trim();
toast("Renamed.");
} catch (e) {
if (e instanceof ApiError && e.code === "token.name") {
nameErr = e.body.message;
return false;
}
}
return true;
}
async function closeToken(force = false) {
if (!made) return;
if (!tokenCopied && !force) {
askClose = true;
return;
}
if (tokenName.trim() && tokenName !== made.name) {
try {
await patch(`/tokens/${encodeURIComponent(made.id)}`, { name: tokenName.trim() });
toast("Renamed.");
} catch (e) {
if (e instanceof ApiError && e.code === "token.name") {
nameErr = e.body.message;
return;
}
}
}
if (!(await rename())) return;
// The token leaves memory with the dialog.
made = null;
tokenName = "";
@@ -170,7 +177,7 @@
<p>{settings?.watch_seconds ?? app.overview?.site?.watch_seconds ?? 60} seconds</p>
<p class="ia-label">Signed in</p>
<p>{viewer ? (viewer.via === "authelia" ? `${viewer.name} through Authelia` : `API token "${viewer.name}"`) : "Through Authelia"}</p>
{#if app.overview?.site?.auth_logout_url}<p><a class="domi-btn link" href={app.overview.site.auth_logout_url}>Sign out</a></p>{/if}
{#if app.overview?.site?.auth_logout_url}<p><a class="ia-link" href={app.overview.site.auth_logout_url}>Sign out</a></p>{/if}
{:else if tab === "api"}
<div class="row">
<h2 class="ia-h3">API tokens</h2>
@@ -236,9 +243,10 @@
{:else}
<p>Ianitor Domi 0.1.0</p>
<p>CPAL-1.0 (Common Public Attribution License 1.0). Ianitor 0.2.0 and earlier stay MPL-2.0.</p>
<p><a class="domi-btn link" href={CREDIT.url} rel="noreferrer">{CREDIT.phrase}</a> · {CREDIT.notice}</p>
<div class="about-credit"><DomiCredit /></div>
<p>Built, tested and signed by Fabrica Domi</p>
<p><a class="domi-btn link" href="https://gitea.marek-novak.cz/mnovak/Ianitor" rel="noreferrer">Source on Gitea</a></p>
<p>Using Ianitor over a network counts as distribution under CPAL-1.0 (§15), so its source, with any changes, stays
available: <a class="ia-link" href="https://gitea.marek-novak.cz/mnovak/Ianitor" rel="noreferrer">Source on Gitea</a></p>
{/if}
</div>
@@ -248,12 +256,9 @@
<p class="ia-text2">Ianitor cannot show it again; if it is lost, make a new one and revoke this one.</p>
<input class="ia-secret" readonly value={made.token} aria-label="New API token" onfocus={(e) => (e.currentTarget as HTMLInputElement).select()} />
<div class="grid">
<div class="domi-field">
<label class="domi-field-label" for="token-name">Name</label>
<input id="token-name" class="domi-input" bind:value={tokenName} aria-invalid={nameErr ? "true" : undefined} />
{#if nameErr}<p class="domi-error">{nameErr}</p>{/if}
<p class="ia-hint">Rename it now or later, so you know what uses it.</p>
</div>
<TextField id="token-name" label="Name" bind:value={tokenName} autocomplete="off" action="save" actionLabel="Rename the token"
onsend={async () => { if (!(await rename())) throw new DomiError(nameErr ?? "That name was not accepted."); }}
error={nameErr ?? undefined} hint="Rename it now or later, so you know what uses it." />
<Button variant={tokenCopied ? "quiet" : "primary"} icon="copy" onclick={copyToken} data-autofocus>{tokenCopied ? "Copy again" : "Copy token"}</Button>
</div>
{#if tokenCopied}<p role="status">Copied. Paste it into Custos now. Ianitor cannot show it again.</p>{/if}
@@ -267,16 +272,17 @@
{/if}
<style>
.about-credit :global(.domi-credit) { justify-content: flex-start; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs [role="tab"] { min-height: 44px; padding: 0 1rem; border-radius: var(--radius-sm); border: 0; background: none; color: var(--text-2); font-weight: 600; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.tabs [role="tab"] { min-height: 44px; padding: 0 1rem; border-radius: var(--radius-sm); border: 0; background: none; color: var(--domi-fg-2); font-weight: 600; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: var(--domi-hover); color: var(--domi-fg); }
.panel { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.rows li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--domi-line); }
.grow { flex: 1 1 200px; min-width: 0; }
.tname { font-weight: 600; }
.struck { text-decoration: line-through; color: var(--muted); }
.struck { text-decoration: line-through; color: var(--domi-muted); }
.grid { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 719.98px) { .grid { grid-template-columns: 1fr; } }
</style>
+6
View File
@@ -10,6 +10,8 @@ import { cleanup, render, waitFor } from "@testing-library/svelte";
import { afterEach, describe, expect, it } from "vitest";
import App from "../src/App.svelte";
import { app } from "../src/lib/app.svelte";
import { DOMI_ATTRIBUTION } from "@domi/ui";
import { CREDIT } from "../src/lib/credit";
import { SHOTS, demoApi, realLooking } from "./demo";
let served: { status: number; path: string; text: string | null }[] = [];
@@ -55,6 +57,10 @@ describe("realLooking", () => {
expect(realLooking("flowers.stage")).toEqual(["flowers.stage", "flowers"]);
});
it("is the same credit as @domi/ui's, word for word", () => {
expect([CREDIT.phrase, CREDIT.url, CREDIT.notice]).toEqual([DOMI_ATTRIBUTION.phrase, DOMI_ATTRIBUTION.url, DOMI_ATTRIBUTION.copyright]);
});
it("leaves out only the licence's credit, exactly as written", () => {
expect(realLooking("Built on Domi · Copyright (c) 2026 Marek Novák https://aula.marek-novak.cz")).toEqual([]);
expect(realLooking("Marek's server at https://aula.marek-novak.cz/hosts")).toContain("marek");