Compare commits

...

11 Commits

Author SHA1 Message Date
Kelorastus f69ba7c016 fix 2026-10-02 16:53:01 +02:00
Kelorastus 540f694f01 Revert "dev mode: prefer the DHP's data, fall back to the local install"
This reverts commit 53bba10b3e.
2026-10-02 16:19:24 +02:00
Kelorastus ee2d56b705 update 2026-10-02 16:10:51 +02:00
Kelorastus 53bba10b3e dev mode: prefer the DHP's data, fall back to the local install
A dev run is for working on the client, and the data worth working against lives
on the DHP. Deciding this by "is anything installed" guessed wrong both ways: a PC
with an old install silently ran on stale local data, with nothing on screen
saying so, while a PC with none was refused outright.

Now: dev mode + the DHP answering -> the client runs from the checkout against the
DHP's API and tiles, installed or not. No DHP -> the local stack, as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-02 16:10:07 +02:00
Valentin 7a97afe046 Update tauri.conf.json 2026-10-02 14:36:51 +02:00
Valentin 9d4da39cb6 Update tauri.conf.json 2026-10-02 14:28:06 +02:00
Valentin 4450722428 Update tauri.conf.json 2026-10-02 14:20:36 +02:00
Kelorastus 167dbd6d3a Merge branch 'main' of http://192.168.1.41:30061/admin/ODIAN_Launcher 2026-10-02 13:10:50 +02:00
Kelorastus 30123e5576 update 2026-10-02 13:10:49 +02:00
JIMMY_JFEXP 6af563793b Merge branch 'main' of http://192.168.1.41:30061/admin/ODIAN_Launcher 2026-10-02 13:06:05 +02:00
JIMMY_JFEXP 52f77c814c 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.
2026-09-29 16:22:41 +02:00
4 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "ODIAN Launcher",
"version": "0.1.45",
"version": "0.1.51",
"identifier": "fr.odian.launcher",
"build": {
"frontendDist": "../dist",
+18 -1
View File
@@ -257,6 +257,20 @@
Offline: ODIAN <strong>{s?.installed}</strong> runs on local data and map tiles.
{/if}
</p>
{#if s?.online && !s.signed_in && !checking}
<!-- The operator is remembered with the install (launcher.json travels with a drive),
the DHP sign-in is not (Credential Manager, per PC). So a drive on another PC offers
Launch as if nothing were missing, and ODIAN then runs on that PC's own data: no live
aircraft, no tiles from the site. Launch stays the button - a sign-in that cannot
complete must not stop ODIAN - but the gap is said here, with the way out. -->
<p class="secondary attention">
<Icon name="alert" size={14} />
<span>
Not signed in on this PC: ODIAN will run on this PC's own data, without live aircraft.
<button class="btn-link" disabled={blocked} onclick={() => launcher.signIn()}>Sign in</button>
</span>
</p>
{/if}
{#if launcher.syncAttention > 0}
<p class="secondary attention">
<Icon name="alert" size={14} />
@@ -492,8 +506,11 @@
{#if !devRun}
<p class="dev-note">Name the folder that holds <code>ODIAN_Engine</code> and Launch runs from it.</p>
{:else if devUser}
<!-- One line, and ONE flex child: `.attention` is display:flex, so loose text and
<strong> each become a column. "no live data" earns its place - the old wording
said only "no sync", and the missing tracks were hunted through the whole stack. -->
<p class="dev-note attention">
Running as <strong>{devUser}</strong> — this PC will not sync with the DHP.
<span>Running as <strong>{devUser}</strong> — no sync, no live data.</span>
</p>
{/if}
</section>
+6 -1
View File
@@ -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
@@ -265,6 +265,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;
+1
View File
@@ -349,6 +349,7 @@ export const MOCK_SCENARIOS = [
"first-run",
"update-required",
"ready",
"new-pc",
"offline-installed",
"offline-not-installed",
"installing",