From 52f77c814c0fd656b91e37c3aa94770aa9bedeb2 Mon Sep 17 00:00:00 2001 From: JIMMY_JFEXP <108483685+Kelorastus@users.noreply.github.com> Date: Tue, 29 Sep 2026 16:22:41 +0200 Subject: [PATCH] Launcher window: say "Not signed in on this PC" under Launch, with Sign in The dev drive on another PC still had no live aircraft after that PC's launcher went live: its API log kept saying "the DHP answered, but this PC has no DHP sign-in yet", and launcher.json was never rewritten, i.e. no sign-in ever completed there. Root cause is the window, not the operator: the action panel offers Sign in only when nothing is installed, an update is due, or no operator is remembered (actionFor). The operator is remembered IN launcher.json, which travels with the drive, while the sign-in lives in that PC's Credential Manager - so a drive on a new PC shows Launch as if nothing were missing, and Sign in sits in Settings > Account where nothing points to it. Under Launch, while online and not signed in, the panel now says ODIAN will run on this PC's own data without live aircraft, with a Sign in link. Launch stays the button: a sign-in that cannot complete must not stop ODIAN. New mock scenario `new-pc` (online, installed, operator remembered, no sign-in). Spot-check: npm run dev -> ?scenario=new-pc shows the line; its Sign in link runs the sign-in and the line goes, the status bar then reading "Signed in as". svelte-check: 0 errors. --- src/components/ActionPanel.svelte | 14 ++++++++++++++ src/lib/mock.ts | 7 ++++++- src/lib/types.ts | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/ActionPanel.svelte b/src/components/ActionPanel.svelte index 0ce8afd..4b4fad1 100644 --- a/src/components/ActionPanel.svelte +++ b/src/components/ActionPanel.svelte @@ -223,6 +223,20 @@ Offline: ODIAN {s?.installed} runs on local data and map tiles. {/if}

+ {#if s?.online && !s.signed_in && !checking} + +

+ + + Not signed in on this PC: ODIAN will run on this PC's own data, without live aircraft. + + +

+ {/if} {#if launcher.syncAttention > 0}

diff --git a/src/lib/mock.ts b/src/lib/mock.ts index ee36619..aaafaea 100644 --- a/src/lib/mock.ts +++ b/src/lib/mock.ts @@ -1,7 +1,7 @@ // Browser-only stand-in for the Rust backend, so the hub can be designed with // `npm run dev`. Same shapes as docs/CONTRACT.md, driven by timers. // -// ?scenario=first-run | update-required | ready | offline-installed | +// ?scenario=first-run | update-required | ready | new-pc | offline-installed | // offline-not-installed | installing | running | sync-conflicts | error | // dev (a licensed developer PC: the Dev section of Settings appears) // &fail=sign_in | install | restore | launch | notes make that flow fail @@ -259,6 +259,11 @@ function initialStatus(scenario: MockScenario): Status { case "ready": Object.assign(s, { installed: CURRENT, operator: OPERATOR, signed_in: true }); break; + case "new-pc": + // A drive on a PC it has never been on: the install and its operator came with it, + // the DHP sign-in (per PC) did not. Online, launchable, and not signed in. + Object.assign(s, { installed: CURRENT, operator: OPERATOR, signed_in: false }); + break; case "offline-installed": Object.assign(s, { online: false, installed: PREVIOUS, operator: OPERATOR }); break; diff --git a/src/lib/types.ts b/src/lib/types.ts index 397f35f..f24aa85 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -292,6 +292,7 @@ export const MOCK_SCENARIOS = [ "first-run", "update-required", "ready", + "new-pc", "offline-installed", "offline-not-installed", "installing",