update
This commit is contained in:
@@ -66,6 +66,8 @@
|
||||
return { label: "Taking map tiles", tone: "accent", pulse: true, meta: tileMeta };
|
||||
case "removing":
|
||||
return { label: "Removing", tone: "accent", pulse: true, meta: rp ? `${rp.index}/${rp.count}` : null };
|
||||
case "building":
|
||||
return { label: "Building the checkout", tone: "accent", pulse: true, meta: null };
|
||||
case "update":
|
||||
return { label: "Update required", tone: "warn", pulse: false, meta: `${s?.installed} → ${s?.available}` };
|
||||
case "launch":
|
||||
@@ -92,6 +94,16 @@
|
||||
return (unfinished?.items ?? 0) > titles.length || titles.length > 2 ? `${shown}…` : shown;
|
||||
});
|
||||
|
||||
// Said out loud whenever this run is not the installed ODIAN. A dev client looks exactly
|
||||
// like the real one on screen, and mistaking the two is how a bug gets chased in the
|
||||
// wrong tree - or a demo gets given from an unbuilt branch.
|
||||
const devRun = $derived((s?.dev ?? null) !== null && (launcher.settings?.dev_mode ?? false));
|
||||
// Named only when it is someone ELSE: running as yourself is not worth a warning.
|
||||
const devUser = $derived.by(() => {
|
||||
const asked = launcher.settings?.dev_user?.trim() ?? "";
|
||||
return devRun && asked && asked !== s?.operator ? asked : "";
|
||||
});
|
||||
|
||||
const tiles = $derived(s?.tiles_waiting ?? null);
|
||||
const tilesOffered = $derived(tiles !== null && tiles.tiles > 0);
|
||||
const tilesCount = $derived(tiles === null ? "" : `${formatCount(tiles.tiles)}${tiles.more ? "+" : ""}`);
|
||||
@@ -209,6 +221,16 @@
|
||||
<button class="btn-link" disabled={blocked} onclick={() => launcher.openSync()}>Sync</button>
|
||||
</p>
|
||||
{/if}
|
||||
{#if devRun}
|
||||
<p class="secondary attention">
|
||||
<Icon name="alert" size={14} />
|
||||
<span>
|
||||
Dev mode: ODIAN runs from your checkout, not from the installed
|
||||
<strong>{s?.installed ?? "version"}</strong>.{#if devUser}
|
||||
Running as <strong>{devUser}</strong> — sync is off.{/if}
|
||||
</span>
|
||||
</p>
|
||||
{/if}
|
||||
{#if unfinished}
|
||||
<p class="secondary attention">
|
||||
<Icon name="alert" size={14} />
|
||||
@@ -286,6 +308,14 @@
|
||||
<ProgressBar value={null} label="Syncing with the DHP" />
|
||||
</div>
|
||||
<p class="secondary">Sending this PC's changes to {site} and taking in the other operators' work.</p>
|
||||
{:else if action === "building"}
|
||||
<div class="progress">
|
||||
<div class="stage-line">
|
||||
<span class="stage-name">Compiling ODIAN from your checkout</span>
|
||||
</div>
|
||||
<ProgressBar value={null} label="Building" />
|
||||
</div>
|
||||
<p class="secondary">The build's own window has its output. A first build takes a while.</p>
|
||||
{:else if action === "removing"}
|
||||
<div class="progress">
|
||||
<div class="stage-line">
|
||||
|
||||
Reference in New Issue
Block a user