feat(config): add backlight control settings

This commit is contained in:
Cameron Fleming 2025-01-03 22:05:46 +00:00
parent 3271a1796b
commit 4fd8b1e6ff
1 changed files with 18 additions and 12 deletions

View File

@ -12,23 +12,29 @@ type WakeOnLanDevice struct {
}
type Config struct {
CloudURL string `json:"cloud_url"`
CloudToken string `json:"cloud_token"`
GoogleIdentity string `json:"google_identity"`
JigglerEnabled bool `json:"jiggler_enabled"`
AutoUpdateEnabled bool `json:"auto_update_enabled"`
IncludePreRelease bool `json:"include_pre_release"`
HashedPassword string `json:"hashed_password"`
LocalAuthToken string `json:"local_auth_token"`
LocalAuthMode string `json:"localAuthMode"` //TODO: fix it with migration
WakeOnLanDevices []WakeOnLanDevice `json:"wake_on_lan_devices"`
CloudURL string `json:"cloud_url"`
CloudToken string `json:"cloud_token"`
GoogleIdentity string `json:"google_identity"`
JigglerEnabled bool `json:"jiggler_enabled"`
AutoUpdateEnabled bool `json:"auto_update_enabled"`
IncludePreRelease bool `json:"include_pre_release"`
HashedPassword string `json:"hashed_password"`
LocalAuthToken string `json:"local_auth_token"`
LocalAuthMode string `json:"localAuthMode"` //TODO: fix it with migration
WakeOnLanDevices []WakeOnLanDevice `json:"wake_on_lan_devices"`
DisplayMaxBrightness int `json:"display_max_brightness"`
DisplayDimAfterMs int64 `json:"display_dim_after_ms"`
DisplayOffAfterMs int64 `json:"display_off_after_ms"`
}
const configPath = "/userdata/kvm_config.json"
var defaultConfig = &Config{
CloudURL: "https://api.jetkvm.com",
AutoUpdateEnabled: true, // Set a default value
CloudURL: "https://api.jetkvm.com",
AutoUpdateEnabled: true, // Set a default value
DisplayMaxBrightness: 100,
DisplayDimAfterMs: 0,
DisplayOffAfterMs: 0,
}
var config *Config