feat(webui): bootstrap account settings management with light and dark mode

This commit is contained in:
Julien Dessaux 2025-01-30 00:19:16 +01:00
parent ab043d8617
commit 98c7d6f578
Signed by: adyxax
GPG key ID: F92E51B86E07177E
13 changed files with 136 additions and 14 deletions

View file

@ -2,6 +2,7 @@ package model
import (
"crypto/subtle"
"encoding/json"
"time"
"git.adyxax.org/adyxax/tfstated/pkg/helpers"
@ -17,7 +18,7 @@ type Account struct {
IsAdmin bool
Created time.Time
LastLogin time.Time
Settings any
Settings json.RawMessage
}
func (account *Account) CheckPassword(password string) bool {

7
pkg/model/settings.go Normal file
View file

@ -0,0 +1,7 @@
package model
type SettingsContextKey struct{}
type Settings struct {
LightMode bool `json:"light_mode"`
}