[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:
+19
-18
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user