wip-devtools

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 14:53:36 -04:00
1 parent 9903aff52b
commit 3c8d15b97d
6 files changed
+182 -2

No files matched your search

+2 -2
View File
@@ -44,8 +44,8 @@ func RefreshIntervalSelector(c *ui.Context, interval *time.Duration, opts Refres
options := []SelectOption[time.Duration]{{Value: 0, Label: msg(c, "refresh_interval_selector.off")}}
known := *interval == 0
for _, d := range choices {
if d < time.Second {
panic("mujica: RefreshIntervalSelector intervals must be at least a second")
if d < time.Second || d%time.Second != 0 {
panic("mujica: RefreshIntervalSelector intervals must be whole seconds")
}
known = known || d == *interval
label := fmt.Sprintf(msg(c, "refresh_interval_selector.seconds"), int(d/time.Second))