clock-digital12 and clock-digital had become the same module (same lib/clock code, same right-click settings), differing only in the starting format. Keep one: the Digital Clock now starts in 12-hour mode with AM/PM, and its "Time format" setting switches to 24-hour. - components/clock-digital12 is gone (and from scripts/components.txt); lib/clock drops digital12_info/digital12_config. - The default panel loads clock-digital. - "clock-digital12" stays an alias (find_module, slot_of, saved panels) and is never listed in the module picker, even if an old .wasm is still installed. - panel.edn gets :version 2. A version-1 panel is migrated once: the old 12-hour clock becomes the Digital Clock with its settings (state.edn :module-config) moved over in 12-hour mode; a panel that had the old 24-hour Digital Clock keeps 24-hour. The file is rewritten afterwards. - Tests updated, plus a migration test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgnZsS91fwCreut8FL
This commit is contained in:
25 files changed
+207
-925
No files matched your search
+4
-11
@@ -6,12 +6,6 @@ pub fn digital_info() -> (String, String, Int, Int, Int) {
|
||||
("org.chandra.clock.digital", "Digital Clock", 120, 36, 80)
|
||||
}
|
||||
|
||||
///| The 12-hour digital clock (clock-digital12, the default panel's clock): same rendering
|
||||
/// and settings as the digital clock, but it starts in 12-hour mode with AM/PM.
|
||||
pub fn digital12_info() -> (String, String, Int, Int, Int) {
|
||||
("org.chandra.clock.digital12", "Digital Clock (12-hour)", 120, 36, 80)
|
||||
}
|
||||
|
||||
///|
|
||||
pub fn render_digital(
|
||||
size : @types.Size,
|
||||
@@ -270,11 +264,10 @@ test "clock settings" {
|
||||
assert_eq(bin.length() < 30, true) // two columns fewer
|
||||
}
|
||||
|
||||
///| The digital clock module's settings (one module instance per wasm instance).
|
||||
pub let digital_config : ClockConfig = ClockConfig::new()
|
||||
|
||||
///| The 12-hour digital clock module's settings: starts in 12-hour mode with AM/PM.
|
||||
pub let digital12_config : ClockConfig = ClockConfig::new(hour12=true)
|
||||
///| The digital clock module's settings (one module instance per wasm instance): it starts in
|
||||
/// 12-hour mode with AM/PM; "Time format" in its right-click settings switches to 24-hour.
|
||||
/// (It replaced the separate 12-hour clock module, clock-digital12.)
|
||||
pub let digital_config : ClockConfig = ClockConfig::new(hour12=true)
|
||||
|
||||
///| The binary clock module's settings.
|
||||
pub let binary_config : ClockConfig = ClockConfig::new()
|
||||
|
||||
Reference in new issue
Block a user