@leitwerk-dev/ui 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ApiTokensPage-B15IzsLp.css +1 -0
- package/dist/assets/ApiTokensPage-ClJp9PYr.js +1 -0
- package/dist/assets/ChronicleMarkdown-lqwX9Ywa.js +16 -0
- package/dist/assets/ChronicleMarkdown-wsUF8Z75.css +1 -0
- package/dist/assets/FutureLaunchDetailPage-BOoZaG11.css +1 -0
- package/dist/assets/FutureLaunchDetailPage-Bdlgm4cJ.js +1 -0
- package/dist/assets/GenericLauncher-Bf7Eb1Rw.js +1 -0
- package/dist/assets/GenericLauncher-CExW6wei.css +1 -0
- package/dist/assets/HomePage-CSkNdC4m.js +1 -0
- package/dist/assets/PageHeader-DPuQInDo.css +1 -0
- package/dist/assets/PageHeader-sphJnWL1.js +1 -0
- package/dist/assets/ProcessActionsMenu-DLMywI9c.js +1 -0
- package/dist/assets/ProcessActionsMenu-VKT7PE6z.css +1 -0
- package/dist/assets/ProcessDetailPage-Cth6A0DN.css +1 -0
- package/dist/assets/ProcessDetailPage-fvvdvO19.js +14 -0
- package/dist/assets/ProcessFlowDiagram-Dx2wheGN.js +2 -0
- package/dist/assets/ProcessesPage-uLl7LXp8.js +1 -0
- package/dist/assets/ProcessesPage-yPjjrzjg.css +1 -0
- package/dist/assets/ScheduleDateTimePicker-DmojMRxN.js +1 -0
- package/dist/assets/{ScheduleDateTimePicker-CadXN9z7.css → ScheduleDateTimePicker-uacJAkIq.css} +1 -1
- package/dist/assets/SkillsPage-CJrtt8xU.css +1 -0
- package/dist/assets/SkillsPage-CotbGUxm.js +2 -0
- package/dist/assets/WatchersPage-ByWGNJet.js +1 -0
- package/dist/assets/WatchersPage-cRBnmTAD.css +1 -0
- package/dist/assets/external-links-CX92-VRP.js +1 -0
- package/dist/assets/http-client-VpPXJwbR.js +2 -0
- package/dist/assets/index-C7zNe3je.js +6 -0
- package/dist/assets/index-DtEI5gsQ.css +1 -0
- package/dist/assets/index-client-BYQviCtQ.js +2 -0
- package/dist/assets/{mermaid-render.worker-DAVgiVRG.js → mermaid-render.worker-QW2WZpEE.js} +12 -12
- package/dist/assets/process-terminal-display-BQRQwGod.js +1 -0
- package/dist/assets/router.svelte-EEldxHlO.js +1 -0
- package/dist/index.html +8 -8
- package/package.json +8 -8
- package/src/App.svelte +36 -0
- package/src/chronicle/components/ChronicleActionSection.svelte +70 -143
- package/src/chronicle/components/ChronicleCreateIssueButton.svelte +22 -0
- package/src/chronicle/components/ChronicleEntryHeader.svelte +76 -0
- package/src/chronicle/components/ChronicleExpandButton.svelte +11 -34
- package/src/chronicle/components/ChronicleFailureMessage.svelte +41 -0
- package/src/chronicle/components/ChronicleFlow.svelte +133 -28
- package/src/chronicle/components/ChronicleLeafOutcomeRendererHost.svelte +1 -8
- package/src/chronicle/components/ChronicleLeafOutcomeSection.svelte +25 -52
- package/src/chronicle/components/ChronicleLiveChip.svelte +1 -35
- package/src/chronicle/components/ChronicleLiveTail.svelte +55 -154
- package/src/chronicle/components/ChronicleMarkdown.svelte +6 -6
- package/src/chronicle/components/ChronicleOperatorInputSection.svelte +5 -18
- package/src/chronicle/components/ChronicleProcessErrorSection.svelte +10 -107
- package/src/chronicle/components/ChroniclePromptSection.svelte +6 -26
- package/src/chronicle/components/ChronicleQuestionRequest.svelte +22 -5
- package/src/chronicle/components/ChronicleReasoningDetailsOverlay.svelte +71 -109
- package/src/chronicle/components/ChronicleRecoverySection.svelte +96 -264
- package/src/chronicle/components/ChronicleScheduledActionSection.svelte +1 -1
- package/src/chronicle/components/ChronicleSectionHeader.svelte +1 -4
- package/src/chronicle/components/ChronicleStartupHistory.svelte +63 -0
- package/src/chronicle/components/ChronicleStartupRecoverySection.svelte +10 -26
- package/src/chronicle/components/ChronicleThinkingSection.svelte +25 -165
- package/src/chronicle/components/ChronicleThinkingText.svelte +1 -0
- package/src/chronicle/components/ChronicleToolApproval.svelte +40 -0
- package/src/chronicle/components/ChronicleToolCallItem.svelte +1 -1
- package/src/chronicle/components/ChronicleTurnCluster.svelte +208 -284
- package/src/chronicle/components/ChronicleTurnDetailsButton.svelte +16 -0
- package/src/chronicle/components/ChronicleTurnProgress.svelte +77 -54
- package/src/chronicle/components/ChronicleTurnRail.svelte +327 -391
- package/src/chronicle/components/CompactActionComposer.svelte +36 -13
- package/src/chronicle/components/ReadonlyJsonValue.svelte +30 -0
- package/src/chronicle/lib/action-bindings.ts +1 -1
- package/src/chronicle/lib/action-model-display.ts +2 -2
- package/src/chronicle/lib/action-preview.ts +1 -1
- package/src/chronicle/lib/chronicle-projection.ts +125 -109
- package/src/chronicle/lib/chronicle-rail-groups.ts +158 -0
- package/src/chronicle/lib/chronicle-selectable-items.ts +16 -11
- package/src/chronicle/lib/chronicle-ticket-artifact.ts +7 -0
- package/src/chronicle/lib/formatting.ts +19 -0
- package/src/chronicle/lib/leaf-outcome-loader.ts +30 -111
- package/src/chronicle/lib/leaf-outcome-runtime.ts +3 -15
- package/src/chronicle/lib/result-presentation.ts +40 -0
- package/src/chronicle/lib/retry-groups.ts +24 -0
- package/src/chronicle/lib/scroll-sync.ts +1 -0
- package/src/chronicle/lib/tool-call-summary.ts +1 -9
- package/src/chronicle/ticket-selection.ts +23 -0
- package/src/components/ElapsedTime.svelte +31 -0
- package/src/components/ExternalLink.svelte +39 -0
- package/src/components/FormFieldRenderer.svelte +4 -1
- package/src/components/GenericLauncher.svelte +40 -15
- package/src/components/KeyboardShortcutsModal.svelte +2 -2
- package/src/components/LaunchChecklist.svelte +184 -0
- package/src/components/ModalShell.svelte +43 -32
- package/src/components/PageHeader.svelte +7 -33
- package/src/components/ProcessActionsMenu.svelte +217 -140
- package/src/components/ProcessInfoOverlay.svelte +13 -21
- package/src/components/ProgressChecklist.svelte +46 -0
- package/src/components/ProgressChecklistRows.svelte +80 -0
- package/src/components/launcher-form-copy.ts +4 -1
- package/src/components/launcher-model-config.ts +1 -1
- package/src/extension-ui-dev-server.ts +2 -5
- package/src/lib/api-tokens.ts +34 -0
- package/src/lib/api.ts +323 -455
- package/src/lib/elapsed-time.ts +19 -0
- package/src/lib/external-links.ts +81 -0
- package/src/lib/flow-layout.ts +1 -8
- package/src/lib/format.ts +3 -26
- package/src/lib/future-launch-detail.ts +1 -1
- package/src/lib/http-client.ts +79 -0
- package/src/lib/launch-updates.ts +17 -0
- package/src/lib/markdown.ts +8 -1
- package/src/lib/primary-path-detail.ts +97 -3
- package/src/lib/primary-path-replay.ts +13 -7
- package/src/lib/process-row-view.ts +1 -1
- package/src/lib/process-terminal-display.ts +4 -7
- package/src/lib/processes.svelte.ts +41 -9
- package/src/lib/reasoning-history.ts +95 -0
- package/src/lib/retry-config.svelte.ts +1 -1
- package/src/lib/rich-markdown-elements.ts +2 -2
- package/src/lib/router-logic.ts +3 -0
- package/src/lib/runtime-config.ts +1 -3
- package/src/lib/test-fixtures.ts +1 -1
- package/src/lib/tool-call-rendering.ts +4 -1
- package/src/lib/ui-extensions.svelte.ts +78 -127
- package/src/lib/ws-classifier.ts +8 -1
- package/src/pages/ApiTokensPage.svelte +213 -0
- package/src/pages/FutureLaunchDetailPage.svelte +7 -35
- package/src/pages/HomePage.svelte +7 -7
- package/src/pages/ProcessCard.svelte +1 -1
- package/src/pages/ProcessDetailPage.svelte +158 -62
- package/src/pages/ProcessGallery.svelte +1 -1
- package/src/pages/ProcessesPage.svelte +7 -42
- package/src/pages/SkillsPage.svelte +37 -26
- package/src/pages/WatchersPage.svelte +31 -53
- package/src/pages/process-detail/ProcessDetailChronicle.svelte +125 -28
- package/src/pages/process-detail/ProcessDetailHeader.svelte +24 -2
- package/src/pages/process-detail/ProcessSummary.svelte +35 -0
- package/src/pages/process-detail/TicketCreationComposer.svelte +219 -0
- package/src/pages/process-detail/process-detail-action-drafts.svelte.ts +5 -5
- package/src/pages/process-detail/process-detail-actions.svelte.ts +4 -2
- package/src/pages/process-detail/process-detail-chronicle-dom.ts +39 -14
- package/src/pages/process-detail/process-detail-chronicle-scroll.svelte.ts +68 -10
- package/src/pages/process-detail/process-detail-view-model.ts +10 -24
- package/src/shell/AppShell.svelte +4 -1
- package/src/shell/Sidebar.svelte +88 -125
- package/src/styles/controls.css +188 -0
- package/dist/assets/ChronicleMarkdown-B1hD4HFS.js +0 -16
- package/dist/assets/ChronicleMarkdown-D6hFzERy.css +0 -1
- package/dist/assets/FutureLaunchDetailPage-Dy3FlLih.js +0 -1
- package/dist/assets/FutureLaunchDetailPage-UFgp7Ju4.css +0 -1
- package/dist/assets/GenericLauncher-BPEQjJ1J.js +0 -1
- package/dist/assets/GenericLauncher-D_GMtsQ5.css +0 -1
- package/dist/assets/HomePage-E41Krxko.js +0 -1
- package/dist/assets/PageHeader-DDgWPeHS.js +0 -1
- package/dist/assets/PageHeader-vhyfX7xT.css +0 -1
- package/dist/assets/ProcessActionsMenu-BWlFe5c4.css +0 -1
- package/dist/assets/ProcessActionsMenu-cI0j2LWe.js +0 -1
- package/dist/assets/ProcessDetailPage-DVHldJgi.js +0 -12
- package/dist/assets/ProcessDetailPage-Oh6ld320.css +0 -1
- package/dist/assets/ProcessFlowDiagram-C6m6V_cB.js +0 -2
- package/dist/assets/ProcessesPage-B2QGyCZO.js +0 -1
- package/dist/assets/ProcessesPage-BcM38HMs.css +0 -1
- package/dist/assets/ScheduleDateTimePicker-aey_oMiH.js +0 -1
- package/dist/assets/SkillsPage-MPITMvhn.css +0 -1
- package/dist/assets/SkillsPage-iB4sbq7r.js +0 -2
- package/dist/assets/WatchersPage-BOSgjtw0.css +0 -1
- package/dist/assets/WatchersPage-l0rwv-Nx.js +0 -1
- package/dist/assets/api-CtKbU0lT.js +0 -1
- package/dist/assets/dist-eOPUi0B8.js +0 -2
- package/dist/assets/index-B4flHG_s.js +0 -7
- package/dist/assets/index-DunTIQSW.css +0 -1
- package/dist/assets/index-client-CnG8mWmF.js +0 -2
- package/dist/assets/retry-config.svelte-WukHimiy.js +0 -1
- package/dist/assets/router.svelte-2RvxUvs5.js +0 -1
- package/src/lib/process-initial-prompt.ts +0 -7
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Actor } from "@leitwerk-dev/domain";
|
|
3
|
+
import type { ApiTokensResponseBody } from "@leitwerk-dev/protocol/http-contracts";
|
|
4
|
+
import { onMount, tick } from "svelte";
|
|
5
|
+
import { createApiToken, fetchApiTokens, revokeApiToken } from "../lib/api-tokens.js";
|
|
6
|
+
|
|
7
|
+
let { authEnabled, actor }: { authEnabled: boolean; actor: Actor } = $props();
|
|
8
|
+
let data = $state<ApiTokensResponseBody | null>(null);
|
|
9
|
+
let loading = $state(true);
|
|
10
|
+
let busy = $state(false);
|
|
11
|
+
let error = $state("");
|
|
12
|
+
let notice = $state("");
|
|
13
|
+
let name = $state("");
|
|
14
|
+
let expiration = $state("default");
|
|
15
|
+
let date = $state("");
|
|
16
|
+
let secret = $state("");
|
|
17
|
+
let copyStatus = $state("");
|
|
18
|
+
let confirmAll = $state(false);
|
|
19
|
+
let alive = true;
|
|
20
|
+
let saveHeading = $state<HTMLHeadingElement | null>(null);
|
|
21
|
+
let nameField = $state<HTMLInputElement | null>(null);
|
|
22
|
+
const displayDate = (value: string) => new Date(value).toLocaleString();
|
|
23
|
+
const duration = (ms: number) =>
|
|
24
|
+
ms >= 86400000 ? `${ms / 86400000} days` : `${ms / 60000} minutes`;
|
|
25
|
+
async function load() {
|
|
26
|
+
loading = true;
|
|
27
|
+
error = "";
|
|
28
|
+
try {
|
|
29
|
+
const result = await fetchApiTokens();
|
|
30
|
+
if (alive) data = result;
|
|
31
|
+
} catch (e) {
|
|
32
|
+
if (alive) error = e instanceof Error ? e.message : "Could not load tokens. Try again.";
|
|
33
|
+
} finally {
|
|
34
|
+
if (alive) loading = false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
onMount(() => {
|
|
38
|
+
void load();
|
|
39
|
+
return () => {
|
|
40
|
+
alive = false;
|
|
41
|
+
secret = "";
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
function dismiss(restoreFocus = true) {
|
|
45
|
+
secret = "";
|
|
46
|
+
copyStatus = "";
|
|
47
|
+
if (restoreFocus)
|
|
48
|
+
void tick().then(() => {
|
|
49
|
+
if (alive) nameField?.focus();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async function create(event: SubmitEvent) {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
if (!data || busy || secret) return;
|
|
55
|
+
busy = true;
|
|
56
|
+
error = "";
|
|
57
|
+
notice = "";
|
|
58
|
+
try {
|
|
59
|
+
const expiresAt =
|
|
60
|
+
expiration === "none"
|
|
61
|
+
? null
|
|
62
|
+
: expiration === "canary"
|
|
63
|
+
? new Date(Date.now() + 1800000).toISOString()
|
|
64
|
+
: expiration === "date"
|
|
65
|
+
? new Date(date).toISOString()
|
|
66
|
+
: undefined;
|
|
67
|
+
const result = await createApiToken(data.csrfToken, { name, expiresAt });
|
|
68
|
+
if (!alive) return;
|
|
69
|
+
secret = result.secret;
|
|
70
|
+
copyStatus = "";
|
|
71
|
+
name = "";
|
|
72
|
+
data = { ...data, tokens: [result.token, ...data.tokens] };
|
|
73
|
+
await tick();
|
|
74
|
+
if (alive) {
|
|
75
|
+
saveHeading?.focus();
|
|
76
|
+
saveHeading?.scrollIntoView?.({ block: "center" });
|
|
77
|
+
}
|
|
78
|
+
} catch (e) {
|
|
79
|
+
if (alive) error = e instanceof Error ? e.message : "Could not create token. Try again.";
|
|
80
|
+
} finally {
|
|
81
|
+
if (alive) busy = false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
async function copy() {
|
|
85
|
+
try {
|
|
86
|
+
await navigator.clipboard.writeText(secret);
|
|
87
|
+
if (alive && secret) copyStatus = "Copied to clipboard.";
|
|
88
|
+
} catch {
|
|
89
|
+
if (alive && secret) copyStatus = "Copy failed. Select the token and copy it manually.";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async function revoke(id?: string) {
|
|
93
|
+
if (!data || busy) return;
|
|
94
|
+
busy = true;
|
|
95
|
+
error = "";
|
|
96
|
+
notice = "";
|
|
97
|
+
try {
|
|
98
|
+
await revokeApiToken(data.csrfToken, id);
|
|
99
|
+
if (!alive) return;
|
|
100
|
+
confirmAll = false;
|
|
101
|
+
notice = id ? "Token revoked." : "All tokens revoked.";
|
|
102
|
+
const result = await fetchApiTokens();
|
|
103
|
+
if (alive) data = result;
|
|
104
|
+
} catch (e) {
|
|
105
|
+
if (alive) error = e instanceof Error ? e.message : "Could not revoke tokens. Try again.";
|
|
106
|
+
} finally {
|
|
107
|
+
if (alive) busy = false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<svelte:window onpagehide={() => dismiss(false)} />
|
|
113
|
+
<div class="tokens-page">
|
|
114
|
+
<header>
|
|
115
|
+
<h1>API tokens</h1>
|
|
116
|
+
<p class="identity">{authEnabled ? actor.displayName ?? actor.id : "Anonymous"}</p>
|
|
117
|
+
<p>Tokens grant full application HTTP API access as their owner. Save them securely and revoke tokens you no longer use. Logging out does not revoke them.</p>
|
|
118
|
+
{#if !authEnabled}<p class="shared-owner">Every visitor shares the anonymous token owner and can view and revoke every anonymous token.</p>{/if}
|
|
119
|
+
</header>
|
|
120
|
+
{#if error}<p role="alert" class="error">{error}</p>{/if}
|
|
121
|
+
{#if notice}<p role="status">{notice}</p>{/if}
|
|
122
|
+
{#if loading && !data}<p role="status">Loading tokens…</p>
|
|
123
|
+
{:else if !data}<button type="button" onclick={load}>Try again</button>
|
|
124
|
+
{:else}
|
|
125
|
+
{#if secret}
|
|
126
|
+
<section class="secret-display" aria-labelledby="save-token-heading">
|
|
127
|
+
<h2 id="save-token-heading" bind:this={saveHeading} tabindex="-1" aria-describedby="save-token-instruction">Save your token now</h2>
|
|
128
|
+
<p id="save-token-instruction">This secret appears only once. Save it before dismissing this message or leaving the page.</p>
|
|
129
|
+
<label for="new-token">New API token</label>
|
|
130
|
+
<textarea id="new-token" readonly value={secret} rows="2" spellcheck="false" autocomplete="off"></textarea>
|
|
131
|
+
<div class="actions"><button type="button" onclick={copy}>Copy token</button><button type="button" onclick={() => dismiss()}>I saved it — dismiss</button></div>
|
|
132
|
+
{#if copyStatus}<p role="status">{copyStatus}</p>{/if}
|
|
133
|
+
</section>
|
|
134
|
+
{/if}
|
|
135
|
+
<section aria-labelledby="create-token-heading">
|
|
136
|
+
<h2 id="create-token-heading">Create a token</h2>
|
|
137
|
+
{#if !data.policy.enabled}<p>Token issuance is disabled. You can still view and revoke existing tokens.</p>
|
|
138
|
+
{:else}
|
|
139
|
+
<form onsubmit={create}>
|
|
140
|
+
<label for="token-name">Name</label>
|
|
141
|
+
<input id="token-name" bind:this={nameField} bind:value={name} required maxlength="100" placeholder="e.g. Release automation" autocomplete="off" disabled={busy || !!secret} />
|
|
142
|
+
<label for="token-expiration">Expiration</label>
|
|
143
|
+
<select id="token-expiration" bind:value={expiration} disabled={busy || !!secret}>
|
|
144
|
+
<option value="default">Default ({duration(data.policy.defaultTtlMs)})</option>
|
|
145
|
+
{#if data.policy.maxTtlMs >= 1800000}<option value="canary">30 minutes</option>{/if}
|
|
146
|
+
<option value="date">Choose date and time</option>
|
|
147
|
+
{#if data.policy.allowNoExpiry}<option value="none">No expiration</option>{/if}
|
|
148
|
+
</select>
|
|
149
|
+
{#if expiration === "date"}
|
|
150
|
+
<label for="token-date">Expiration date and time (local time)</label>
|
|
151
|
+
<input id="token-date" type="datetime-local" bind:value={date} required disabled={busy || !!secret} />
|
|
152
|
+
{/if}
|
|
153
|
+
<p class="hint">Dated tokens may last up to {duration(data.policy.maxTtlMs)}.</p>
|
|
154
|
+
<button class="primary" type="submit" disabled={busy || !!secret || !name.trim()}>{busy ? "Working…" : "Create token"}</button>
|
|
155
|
+
</form>
|
|
156
|
+
{/if}
|
|
157
|
+
</section>
|
|
158
|
+
<section aria-labelledby="your-tokens-heading">
|
|
159
|
+
<div class="section-heading"><h2 id="your-tokens-heading">{authEnabled ? "Your tokens" : "Shared anonymous tokens"}</h2><button type="button" disabled={busy || loading} onclick={load}>Refresh</button></div>
|
|
160
|
+
{#if data.tokens.length === 0}<p>No tokens yet. Create one to connect an HTTP API client.</p>
|
|
161
|
+
{:else}
|
|
162
|
+
<ul class="token-list">
|
|
163
|
+
{#each data.tokens as token (token.id)}
|
|
164
|
+
<li>
|
|
165
|
+
<div class="token-heading"><h3>{token.name}</h3><span>{token.revokedAt ? "Revoked" : token.expiresAt && Date.parse(token.expiresAt) <= Date.now() ? "Expired" : "Active"}</span></div>
|
|
166
|
+
<p class="token-id"><code>{token.prefix}…</code> · {token.id}</p>
|
|
167
|
+
<dl><div><dt>Created</dt><dd>{displayDate(token.createdAt)}</dd></div><div><dt>Expires</dt><dd>{token.expiresAt ? displayDate(token.expiresAt) : "No expiration"}</dd></div><div><dt>Last used</dt><dd>{token.lastUsedAt ? displayDate(token.lastUsedAt) : "Never"}</dd></div>{#if token.revokedAt}<div><dt>Revoked</dt><dd>{displayDate(token.revokedAt)}</dd></div>{/if}</dl>
|
|
168
|
+
{#if !token.revokedAt}<button type="button" class="danger" disabled={busy} aria-label={`Revoke ${token.name}`} onclick={() => revoke(token.id)}>Revoke</button>{/if}
|
|
169
|
+
</li>
|
|
170
|
+
{/each}
|
|
171
|
+
</ul>
|
|
172
|
+
{#if data.tokens.some((token) => !token.revokedAt)}
|
|
173
|
+
{#if confirmAll}
|
|
174
|
+
<div class="revoke-confirmation"><p>Revoke all {authEnabled ? "your" : "shared anonymous"} tokens? Every client using them will lose access. Accepted work and schedules will continue.</p><div class="actions"><button type="button" class="danger" disabled={busy} onclick={() => revoke()}>Confirm revoke all</button><button type="button" disabled={busy} onclick={() => { confirmAll = false; }}>Cancel</button></div></div>
|
|
175
|
+
{:else}<button type="button" class="danger" disabled={busy} onclick={() => { confirmAll = true; }}>Revoke all tokens</button>{/if}
|
|
176
|
+
{/if}
|
|
177
|
+
{/if}
|
|
178
|
+
</section>
|
|
179
|
+
{/if}
|
|
180
|
+
</div>
|
|
181
|
+
<style>
|
|
182
|
+
.tokens-page { max-width: 900px; width: 100%; margin: 0 auto; padding: var(--space-lg) 0 var(--space-2xl); }
|
|
183
|
+
h1 { font-size: var(--type-title-lg); margin: 0 0 var(--space-xs); }
|
|
184
|
+
h2 { font-size: var(--type-title-md); margin: 0 0 var(--space-md); }
|
|
185
|
+
h3 { font-size: var(--type-body-lg); margin: 0; overflow-wrap: anywhere; }
|
|
186
|
+
p { max-width: 72ch; color: var(--chronicle-text-muted); }
|
|
187
|
+
.identity { color: var(--chronicle-text); font-weight: 600; }
|
|
188
|
+
section { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--chronicle-border); }
|
|
189
|
+
form { display: grid; gap: var(--space-sm); max-width: 480px; }
|
|
190
|
+
label { display: block; font-weight: 600; }
|
|
191
|
+
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--chronicle-border-strong); border-radius: var(--radius-sm); background: var(--chronicle-panel-surface); color: var(--chronicle-text); caret-color: var(--chronicle-accent); }
|
|
192
|
+
input { height: calc(1lh + 22px); }
|
|
193
|
+
input::placeholder { color: var(--chronicle-text-muted); }
|
|
194
|
+
button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--chronicle-border-strong); border-radius: var(--radius-sm); background: var(--chronicle-panel-surface); color: var(--chronicle-text); cursor: pointer; }
|
|
195
|
+
button:hover:not(:disabled) { background: var(--chronicle-panel-muted); }
|
|
196
|
+
button:disabled { opacity: .55; cursor: default; }
|
|
197
|
+
.primary { background: var(--chronicle-accent); color: var(--chronicle-text-on-accent); border-color: var(--chronicle-accent); justify-self: start; }
|
|
198
|
+
.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--chronicle-accent) 88%, black); }
|
|
199
|
+
.danger, .error { color: var(--chronicle-danger-text); }
|
|
200
|
+
.hint { font-size: var(--type-body-sm); margin: 0 0 var(--space-xs); }
|
|
201
|
+
.secret-display { background: var(--chronicle-panel-muted); padding: var(--space-lg); border: 0; border-radius: var(--radius-md); }
|
|
202
|
+
textarea { font-family: var(--font-mono); resize: vertical; margin: var(--space-xs) 0 var(--space-md); overflow-wrap: anywhere; }
|
|
203
|
+
.actions, .section-heading, .token-heading { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
|
|
204
|
+
.section-heading, .token-heading { justify-content: space-between; }
|
|
205
|
+
.section-heading h2 { margin: 0; }
|
|
206
|
+
.token-list { padding: 0; list-style: none; margin: var(--space-md) 0; }
|
|
207
|
+
li { padding: var(--space-lg) 0; border-bottom: 1px solid var(--chronicle-border); }
|
|
208
|
+
.token-id { overflow-wrap: anywhere; font-size: var(--type-body-sm); }
|
|
209
|
+
dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-md); font-size: var(--type-body-sm); font-variant-numeric: tabular-nums; }
|
|
210
|
+
dt { color: var(--chronicle-text-muted); } dd { margin: var(--space-2xs) 0 0; }
|
|
211
|
+
.revoke-confirmation { padding: var(--space-md); background: var(--chronicle-danger-surface-soft); }
|
|
212
|
+
@media (max-width: 600px) { .tokens-page { padding-top: var(--space-sm); } .secret-display { padding: var(--space-md); } }
|
|
213
|
+
</style>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { FutureLaunchSummary, UiLauncherSummary } from "@leitwerk-dev/protocol/http-contracts";
|
|
2
3
|
import GenericLauncher from "../components/GenericLauncher.svelte";
|
|
3
4
|
import PageHeader from "../components/PageHeader.svelte";
|
|
4
5
|
import {
|
|
5
6
|
ApiResponseError,
|
|
6
7
|
deleteFutureExecution,
|
|
7
|
-
type FutureLaunchSummary,
|
|
8
8
|
fetchFutureExecution,
|
|
9
9
|
fetchLaunchers,
|
|
10
|
-
type UiLauncherSummary,
|
|
11
10
|
} from "../lib/api.js";
|
|
12
11
|
import { formatLocalDateTime24Hour, formatUtcDateTime24Hour } from "../lib/format.js";
|
|
13
12
|
import { buildFutureLaunchDetailSections } from "../lib/future-launch-detail.js";
|
|
@@ -207,7 +206,7 @@ async function confirmCancel() {
|
|
|
207
206
|
{#snippet actions()}
|
|
208
207
|
<button
|
|
209
208
|
type="button"
|
|
210
|
-
class="secondary-button"
|
|
209
|
+
class="ui-button secondary-button"
|
|
211
210
|
data-pressable="true"
|
|
212
211
|
disabled={!launcher}
|
|
213
212
|
title={launcher ? undefined : "Editing requires this process type to be available"}
|
|
@@ -217,7 +216,7 @@ async function confirmCancel() {
|
|
|
217
216
|
</button>
|
|
218
217
|
<button
|
|
219
218
|
type="button"
|
|
220
|
-
class="danger-button"
|
|
219
|
+
class="ui-button danger-button" data-variant="danger-quiet"
|
|
221
220
|
data-pressable="true"
|
|
222
221
|
disabled={cancelBusy}
|
|
223
222
|
onclick={() => (cancelConfirmOpen = true)}
|
|
@@ -250,10 +249,10 @@ async function confirmCancel() {
|
|
|
250
249
|
{/if}
|
|
251
250
|
</div>
|
|
252
251
|
<div class="confirm-actions">
|
|
253
|
-
<button type="button" class="secondary-button" data-pressable="true" disabled={cancelBusy} onclick={() => (cancelConfirmOpen = false)}>
|
|
252
|
+
<button type="button" class="ui-button secondary-button" data-pressable="true" disabled={cancelBusy} onclick={() => (cancelConfirmOpen = false)}>
|
|
254
253
|
Keep scheduled
|
|
255
254
|
</button>
|
|
256
|
-
<button type="button" class="danger-button" data-pressable="true" disabled={cancelBusy} onclick={() => void confirmCancel()}>
|
|
255
|
+
<button type="button" class="ui-button danger-button" data-variant="danger" data-pressable="true" disabled={cancelBusy} onclick={() => void confirmCancel()}>
|
|
257
256
|
{cancelBusy ? "Canceling…" : "Cancel launch"}
|
|
258
257
|
</button>
|
|
259
258
|
</div>
|
|
@@ -284,7 +283,7 @@ async function confirmCancel() {
|
|
|
284
283
|
/>
|
|
285
284
|
<div class="missing-state" role="status">
|
|
286
285
|
<p>Check All processes for any process this schedule may have started.</p>
|
|
287
|
-
<button type="button" class="secondary-button" onclick={() => navigate(processesPath)}>
|
|
286
|
+
<button type="button" class="ui-button secondary-button" onclick={() => navigate(processesPath)}>
|
|
288
287
|
View all processes
|
|
289
288
|
</button>
|
|
290
289
|
</div>
|
|
@@ -295,7 +294,7 @@ async function confirmCancel() {
|
|
|
295
294
|
{#if futureLaunchDetailError}
|
|
296
295
|
<div class="detail-load-error" role="status">
|
|
297
296
|
<p class="detail-warning">{futureLaunchDetailError}</p>
|
|
298
|
-
<button type="button" class="secondary-button" onclick={retryFutureLaunchDetail}>
|
|
297
|
+
<button type="button" class="ui-button secondary-button" onclick={retryFutureLaunchDetail}>
|
|
299
298
|
Retry
|
|
300
299
|
</button>
|
|
301
300
|
</div>
|
|
@@ -350,33 +349,6 @@ async function confirmCancel() {
|
|
|
350
349
|
justify-content: flex-end;
|
|
351
350
|
}
|
|
352
351
|
|
|
353
|
-
.secondary-button,
|
|
354
|
-
.danger-button {
|
|
355
|
-
min-height: 40px;
|
|
356
|
-
padding: 0 var(--space-md);
|
|
357
|
-
border-radius: 999px;
|
|
358
|
-
font-weight: 650;
|
|
359
|
-
cursor: pointer;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.secondary-button {
|
|
363
|
-
border: 1px solid var(--chronicle-border-strong);
|
|
364
|
-
background: color-mix(in srgb, var(--chronicle-card-surface) 94%, white 6%);
|
|
365
|
-
color: var(--chronicle-text);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.danger-button {
|
|
369
|
-
border: 1px solid var(--chronicle-danger-border);
|
|
370
|
-
background: var(--chronicle-danger-surface-soft);
|
|
371
|
-
color: var(--chronicle-danger-text-strong);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.secondary-button:disabled,
|
|
375
|
-
.danger-button:disabled {
|
|
376
|
-
opacity: 0.62;
|
|
377
|
-
cursor: wait;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
352
|
.detail-warning {
|
|
381
353
|
padding: var(--space-sm) var(--space-md);
|
|
382
354
|
border: 1px solid var(--chronicle-border);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
FutureLaunchSummary,
|
|
4
|
+
ProcessRetryConfig,
|
|
5
|
+
UiLauncherSummary,
|
|
6
|
+
} from "@leitwerk-dev/protocol/http-contracts";
|
|
2
7
|
import GenericLauncher from "../components/GenericLauncher.svelte";
|
|
3
8
|
import PageHeader from "../components/PageHeader.svelte";
|
|
4
|
-
import {
|
|
5
|
-
type FutureLaunchSummary,
|
|
6
|
-
fetchLaunchers,
|
|
7
|
-
type ProcessRetryConfig,
|
|
8
|
-
type UiLauncherSummary,
|
|
9
|
-
} from "../lib/api.js";
|
|
9
|
+
import { fetchLaunchers } from "../lib/api.js";
|
|
10
10
|
import { isInteractiveTarget, isPlainShortcut, isTextEntryTarget } from "../lib/keyboard.js";
|
|
11
11
|
import { keyboardShortcutHelpOpen } from "../lib/keyboard-shortcuts-help.js";
|
|
12
12
|
import { queueProcessLaunchNotice } from "../lib/process-launch-notices.svelte";
|
|
@@ -239,7 +239,7 @@ function handleScheduled(futureExecution: FutureLaunchSummary) {
|
|
|
239
239
|
subtitle={selectedLauncher.card.description ?? selectedLauncher.description}
|
|
240
240
|
>
|
|
241
241
|
{#snippet actions()}
|
|
242
|
-
<button type="button" class="page-header-button" data-pressable="true" onclick={goBackToGallery}>
|
|
242
|
+
<button type="button" class="ui-button page-header-button" data-pressable="true" onclick={goBackToGallery}>
|
|
243
243
|
<span aria-hidden="true">←</span>
|
|
244
244
|
Process types
|
|
245
245
|
</button>
|