aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-20 05:22:44 -0800
committerFuwn <[email protected]>2026-01-20 05:22:44 -0800
commit7e54b79de14a840f252d87b038ecda6c08b7625b (patch)
treecf65b7c5d07c71676907eb0100de2f638634589f /internal/config
parentfix: Allow non-HTTP URL schemes in monitor links (diff)
downloadkaze-7e54b79de14a840f252d87b038ecda6c08b7625b.tar.xz
kaze-7e54b79de14a840f252d87b038ecda6c08b7625b.zip
feat: Add configurable UI scale option
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 7bad5f9..076a203 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -30,6 +30,8 @@ type DisplayConfig struct {
PingFixedSlots bool `yaml:"ping_fixed_slots"`
// Timezone for display (e.g., "UTC", "America/New_York", "Local")
Timezone string `yaml:"timezone"`
+ // Scale adjusts the overall UI scale (default: 1.0, range: 0.5-2.0)
+ Scale float64 `yaml:"scale"`
}
// SiteConfig contains site metadata
@@ -203,6 +205,15 @@ func (c *Config) applyDefaults() {
if c.Display.Timezone == "" {
c.Display.Timezone = "Local"
}
+ if c.Display.Scale == 0 {
+ c.Display.Scale = 1.0
+ }
+ // Clamp scale to reasonable range
+ if c.Display.Scale < 0.5 {
+ c.Display.Scale = 0.5
+ } else if c.Display.Scale > 2.0 {
+ c.Display.Scale = 2.0
+ }
// Apply group defaults
for i := range c.Groups {