[web] The web UI: hosts, add/edit with apply progress, undo, history and restore, share links, engine switch, certificates and device installs, signing by hand, settings and tokens; smoke test counts every §4 flow's clicks
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
<script lang="ts">
|
||||
// Handoff §2.14: the technical text behind "Show details". It never holds a secret.
|
||||
let { detail, reference }: { detail: string; reference?: string } = $props();
|
||||
let open = $state(false);
|
||||
const id = "det-" + Math.random().toString(36).slice(2, 9);
|
||||
const text = $derived(detail + (reference ? `\nReference: ${reference}` : ""));
|
||||
</script>
|
||||
|
||||
<div class="ia-details">
|
||||
<button
|
||||
type="button"
|
||||
class="domi-btn link"
|
||||
aria-expanded={open}
|
||||
aria-controls={id}
|
||||
onclick={() => (open = !open)}
|
||||
>
|
||||
{open ? "Hide details" : "Show details"}
|
||||
</button>
|
||||
{#if open}
|
||||
<div {id}>
|
||||
<pre>{text}</pre>
|
||||
<button
|
||||
type="button"
|
||||
class="domi-btn small"
|
||||
onclick={() => navigator.clipboard?.writeText(text)}>Copy details</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user