[web] Domi UI: the web UI on @domi/ui v1.0.0 (fonts, roles, Button, TextField with seals, Checkbox, Select, Segmented)
This commit is contained in:
@@ -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%; }
|
||||
|
||||
Reference in New Issue
Block a user