From 35042ff04ffc50e55ff59a385849442be4429d6b Mon Sep 17 00:00:00 2001 From: cirakg Date: Mon, 19 Oct 2026 22:28:09 +0200 Subject: feat(ui): add the list, OTP detail, PIN entry, menu, info screens and glance List with live codes and countdowns, adaptive rows and lazy headers; OTP detail with ring or bar, next code and HOTP next; PIN keypad or button selector with create, unlock, change, lockout display and pending promotion; native menu; glance with the entry count; self-test after the first frame; option properties with defaults. Codes are computed one per timer event, apart from drawing, for the watchdog. A UI-test build (uitest.jungle) starts with fake entries, PIN 123456 and a frozen clock. Co-Authored-By: Claude Opus 5.5 --- source/util/Clock.mc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/util/Clock.mc') diff --git a/source/util/Clock.mc b/source/util/Clock.mc index 4e2faf4..44a0e37 100644 --- a/source/util/Clock.mc +++ b/source/util/Clock.mc @@ -22,11 +22,17 @@ module Clock { // Current unix time (UTC seconds) plus the user's offset for clock skew. function nowUnix(offsetSeconds as Number) as Long { + if (TestMode.ON) { + return TestMode.NOW + offsetSeconds; + } return toUnsigned(Time.now().value()) + offsetSeconds; } // The trusted clock's unix time, or null when it isn't synced yet. function trustedUnix() as Long? { + if (TestMode.ON) { + return TestMode.NOW; + } try { return toUnsigned(Time.getCurrentTime({:currentTimeType => Time.CURRENT_TIME_RTC}).value()); } catch (e instanceof Time.RealTimeClockNotValidException) { -- cgit v1.2.3