Added theme to configuration page

This commit is contained in:
Magnus Åhall 2024-06-25 09:18:15 +02:00
parent c77737a20e
commit 54ba7b160b
6 changed files with 29 additions and 0 deletions

View file

@ -38,3 +38,9 @@ func SmonConfigInit() (err error) {
return
}
func (cfg *Configuration) SetTheme(theme string) (err error) {
cfg.Settings["THEME"] = theme
_, err = service.Db.Conn.Exec(`UPDATE public.configuration SET value=$1 WHERE setting='THEME'`, theme)
return
}