diff options
| author | Fuwn <[email protected]> | 2026-01-20 05:22:44 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-20 05:22:44 -0800 |
| commit | 7e54b79de14a840f252d87b038ecda6c08b7625b (patch) | |
| tree | cf65b7c5d07c71676907eb0100de2f638634589f /internal/config | |
| parent | fix: Allow non-HTTP URL schemes in monitor links (diff) | |
| download | kaze-7e54b79de14a840f252d87b038ecda6c08b7625b.tar.xz kaze-7e54b79de14a840f252d87b038ecda6c08b7625b.zip | |
feat: Add configurable UI scale option
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 11 |
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 { |