CI / test (push) Failing after 18s
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
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
// Generated using `moon info`, DON'T EDIT IT
|
|
package "chandra/desktop/lib/clock"
|
|
|
|
import {
|
|
"chandra/desktop/interface/chandra/desktop/theme",
|
|
"chandra/desktop/interface/chandra/desktop/types",
|
|
"moonbitlang/core/debug",
|
|
}
|
|
|
|
// Values
|
|
pub let binary_config : ClockConfig
|
|
|
|
pub fn binary_info() -> (String, String, Int32, Int32, Int32)
|
|
|
|
pub let digital_config : ClockConfig
|
|
|
|
pub fn digital_info() -> (String, String, Int32, Int32, Int32)
|
|
|
|
pub fn render_binary(@types.Size, @theme.Tokens, @types.Datetime, seconds? : Bool) -> Array[@types.DrawOp]
|
|
|
|
pub fn render_digital(@types.Size, @theme.Tokens, @types.Datetime, hour12? : Bool, show_date? : Bool, ampm? : Bool) -> Array[@types.DrawOp]
|
|
|
|
// Errors
|
|
|
|
// Types and methods
|
|
pub(all) struct ClockConfig {
|
|
mut hour12 : Bool
|
|
mut show_date : Bool
|
|
mut seconds : Bool
|
|
mut ampm : Bool
|
|
}
|
|
pub fn ClockConfig::binary_items(Self) -> Array[ConfigEntry]
|
|
pub fn ClockConfig::digital_items(Self) -> Array[ConfigEntry]
|
|
pub fn ClockConfig::new(hour12? : Bool) -> Self
|
|
pub fn ClockConfig::set(Self, String, String) -> Bool
|
|
|
|
#derive(Eq, @debug.Debug)
|
|
pub(all) struct ConfigEntry {
|
|
key : String
|
|
label : String
|
|
choices : Array[String]
|
|
value : String
|
|
}
|
|
|
|
// Type aliases
|
|
|
|
// Traits
|