This commit is contained in:
Kelorastus
2026-09-30 11:15:30 +02:00
parent ffbb8fc9a5
commit d780c12b71
3 changed files with 205 additions and 102 deletions
+1 -102
View File
@@ -113,23 +113,11 @@
] as const;
// ---- releasing ------------------------------------------------------------
const plan = $derived(launcher.release);
const releasing = $derived(busy === "release");
let releaseOpen = $state(false);
let nodePassword = $state("");
let withApi = $state(true);
async function openRelease() {
releaseOpen = true;
launcher.releaseOpen = true;
await launcher.loadRelease();
}
async function doRelease() {
await launcher.releaseRun(nodePassword, withApi);
nodePassword = ""; // held for the one run, never kept
releaseOpen = false;
}
async function browseCheckout() {
const path = await launcher.pickFolder();
if (path) await launcher.setDev({ dev_root: path });
@@ -324,51 +312,6 @@
{/if}
</div>
{#if releaseOpen}
<div class="dev-release-panel">
{#if releasing && !plan}
<p class="dev-note">Looking at what is live and what this PC holds…</p>
{:else if plan}
<ul class="dev-plan">
{#each plan.items as row (row.key)}
<li class:behind={row.behind === true} class:dirty={row.dirty}>
<span class="dev-plan-name">{row.title}</span>
<span class="dev-plan-live mono">{row.live ?? "—"}</span>
<span class="dev-plan-note">{row.note}</span>
</li>
{/each}
</ul>
<div class="dev-checks mono">
<span class:ok={plan.online}>DHP {plan.online ? "✓" : "✗"}</span>
<span class:ok={plan.docker}>Docker {plan.docker ? "✓" : "✗"}</span>
<span class:ok={plan.scripts}>scripts {plan.scripts ? "✓" : "✗"}</span>
</div>
{#if plan.blocked}
<p class="dev-note attention">{plan.blocked}</p>
{:else}
<label class="dev-check">
<input type="checkbox" bind:checked={withApi} disabled={!plan.docker || releasing} />
<span>Also roll the Engine API{plan.docker ? "" : " (needs Docker)"} — logs everyone out</span>
</label>
<div class="dev-row">
<input
class="dev-path"
type="password"
placeholder="node sudo password"
bind:value={nodePassword}
disabled={releasing}
/>
<button class="btn" disabled={releasing || !nodePassword.trim()} onclick={doRelease}>Release</button>
</div>
<p class="dev-note">
Runs in its own window. Each step decides for itself whether it has anything to do.
</p>
{/if}
{/if}
<button class="btn-link" onclick={() => (releaseOpen = false)}>Close</button>
</div>
{/if}
<label class="dev-check">
<input
type="checkbox"
@@ -644,50 +587,6 @@
.dev-release {
font-weight: 600;
}
.dev-release-panel {
display: flex;
flex-direction: column;
gap: 0.4rem;
padding: 0.5rem;
border: 1px solid var(--line, #2a3139);
border-radius: 6px;
background: rgba(0, 0, 0, 0.25);
}
.dev-plan {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.dev-plan li {
display: grid;
grid-template-columns: 5.5rem 4.5rem 1fr;
gap: 0.4rem;
align-items: baseline;
font-size: 0.76rem;
color: var(--text-dim, #9aa3ad);
}
.dev-plan li.behind .dev-plan-name {
color: #46d17f;
}
.dev-plan li.dirty .dev-plan-note {
color: #e6b35a;
}
.dev-plan-name {
font-weight: 600;
color: inherit;
}
.dev-checks {
display: flex;
gap: 0.7rem;
font-size: 0.72rem;
color: #e06c6c;
}
.dev-checks span.ok {
color: #46d17f;
}
.action {
display: grid;