From 151bfda5d4c567ff909a61dc9c90bf8eece1db37 Mon Sep 17 00:00:00 2001 From: cirakg Date: Tue, 20 Oct 2026 18:36:54 +0200 Subject: feat(settings): add the Add OTP, Add code and Manage entry forms with a PIN queue for locked entries The full phone settings form (README 10.2) and its processing (10.3) as one resumable job: Import, Add OTP, Add code, Manage, then the About fields. Forms are applied only when their switch is on, cleared afterwards (secret first; only the secret after a problem), deduplicated by keyed hash, and report into their Result field and the results screen. - Add OTP validates per README 10.4; Add code runs the real encoder (CodeCheck, a job for 2D codes) and caches 2D codes on the way in. - Manage entry: edit, move, require/drop PIN, replace, counter, delete. Changes to locked entries are sealed under "q" and applied only after the PIN is entered under "Phone changes" in the menu. - About: catalog (800 characters max), version, storage use. - "Encrypt names" now applies to new and existing entries. Co-Authored-By: Claude Opus 5.5 --- source/ui/MainMenu.mc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/ui/MainMenu.mc') diff --git a/source/ui/MainMenu.mc b/source/ui/MainMenu.mc index 3d13180..8863c6d 100644 --- a/source/ui/MainMenu.mc +++ b/source/ui/MainMenu.mc @@ -1,5 +1,5 @@ // Author: cirakg & claude ai -// Summary: The menu (README 13.1): lock now, PIN actions, settings results, entry IDs, clock status, about. +// Summary: The menu (README 13.1): phone changes to confirm, lock now, PIN actions, settings results, entry IDs, clock status, about. // // A native Menu2, so scrolling, touch and buttons behave like every other // Garmin menu. Debug builds add the items from DebugMenu. @@ -16,6 +16,10 @@ module MainMenu { function build() as WatchUi.Menu2 { var vault = AppState.theVault(); var menu = new WatchUi.Menu2({:title => "OTP Wallet"}); + var waiting = ChangeQueue.count(vault); + if (waiting > 0) { + menu.addItem(new WatchUi.MenuItem("Phone changes", waiting + " to confirm", :queue, null)); + } if (vault.session.isUnlocked()) { menu.addItem(new WatchUi.MenuItem("Lock now", null, :lock, null)); } @@ -120,6 +124,8 @@ class MainMenuDelegate extends WatchUi.Menu2InputDelegate { WatchUi.switchToView(new InfoView("Results", Results.lines(), "results"), new InfoDelegate(), WatchUi.SLIDE_LEFT); Results.markSeen(); + } else if (id == :queue) { + WatchUi.switchToView(QueueMenu.build(), new QueueMenuDelegate(), WatchUi.SLIDE_LEFT); } else if (id == :ids) { WatchUi.switchToView(new InfoView("Entry IDs", MainMenu.entryIdLines(), "ids"), new InfoDelegate(), WatchUi.SLIDE_LEFT); } else if (id == :clock) { -- cgit v1.2.3