From f8950fc52820fbfb07abfcee5d685686cf97ac54 Mon Sep 17 00:00:00 2001 From: ProjectZero02 <331545278+ProjectZero02@users.noreply.github.com> Date: Wed, 28 Oct 2026 06:02:20 +0000 Subject: [PATCH] PC window: show the first-run setup once Setup was marked done only by Done on its last step. Closing the window part-way, which is natural since the main screen has the same QR codes, started it over on every open. Mark it done when it's first shown instead. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ helper/internal/localui/web/app.js | 4 ++-- helper/internal/store/store.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01e0677..6e0b71c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.2.3 + +- **PC window setup shows once.** The first-run setup was only marked done by **Done** on its last step, so closing the window part-way (the main screen has the same QR codes) started it over on every open. It's now marked done as soon as it's shown. + ## 2.2.2 - **Phone app updates.** Tapping **Update** more than once (or on both the home screen and in Settings) started downloads that overwrote each other, and the update then failed with "The download is corrupt (checksum mismatch)". Only one download runs now, its button shows it's downloading, each download goes to a file of its own, and a damaged download is retried once. If your phone shows that error on the way to this version, tap **Update** once and wait, or install `PowerDeck.apk` from the release page. diff --git a/helper/internal/localui/web/app.js b/helper/internal/localui/web/app.js index 92fa78d..371f57d 100644 --- a/helper/internal/localui/web/app.js +++ b/helper/internal/localui/web/app.js @@ -194,8 +194,6 @@ function showStep(n) { } function finishSetup() { - setting({ setupDone: true }).catch(() => {}); - if (state) state.settings.setupDone = true; showStep(0); refresh(); } @@ -219,6 +217,8 @@ async function refresh() { started = true; link($("app-link"), s.appUrl); link($("app-link-home"), s.appUrl); + // Setup is shown once: closing the window part-way counts too, since home has the same codes. + if (!settings.setupDone) setting({ setupDone: true }).catch(() => {}); showStep(settings.setupDone ? 0 : 1); } diff --git a/helper/internal/store/store.go b/helper/internal/store/store.go index d5365f1..e23d0e6 100644 --- a/helper/internal/store/store.go +++ b/helper/internal/store/store.go @@ -134,7 +134,7 @@ type Settings struct { NoAgents bool `json:"noAgents,omitempty"` // Tray shows PowerDeck's icon in the Windows notification area. Tray bool `json:"tray,omitempty"` - // SetupDone records that the PC window's first-run setup was finished or skipped. + // SetupDone records that the PC window has shown its first-run setup (once is enough). SetupDone bool `json:"setupDone,omitempty"` // UpdatesPausedUntil holds automatic updates back until then. UpdatesPausedUntil time.Time `json:"updatesPausedUntil,omitzero"`