chore: build
Backend - Build & Lint / build (push) Has been cancelled
Frontend Web - Build & Lint / build (push) Has been cancelled

This commit is contained in:
2026-06-21 14:48:38 +02:00
parent 880d5ac234
commit 5568ebdf31
6 changed files with 31 additions and 3 deletions
+8
View File
@@ -82,6 +82,8 @@ func DefaultSettings() models.AppSettings {
ClientColorSuccess: "#4ade80",
ClientColorDanger: "#ef4444",
ClientColorWarning: "#f59e0b",
ClientTitleGradientFrom: "#a78bfa",
ClientTitleGradientTo: "#22d3ee",
DeliverySchedule: DefaultDeliverySchedule(),
PostalZones: []models.PostalZone{
{Name: "Zone 30€", MinAmount: 30, Codes: []string{"44000", "44100", "44200", "44300"}},
@@ -193,6 +195,10 @@ func (d *Database) GetSettings() (models.AppSettings, error) {
settings.ClientColorDanger = row.Value
case "client_color_warning":
settings.ClientColorWarning = row.Value
case "client_title_gradient_from":
settings.ClientTitleGradientFrom = row.Value
case "client_title_gradient_to":
settings.ClientTitleGradientTo = row.Value
}
}
return settings, nil
@@ -293,6 +299,8 @@ func (d *Database) UpdateSettings(s models.AppSettings) error {
{"client_color_success", s.ClientColorSuccess},
{"client_color_danger", s.ClientColorDanger},
{"client_color_warning", s.ClientColorWarning},
{"client_title_gradient_from", s.ClientTitleGradientFrom},
{"client_title_gradient_to", s.ClientTitleGradientTo},
}
upsert := `INSERT INTO app_settings (key, value) VALUES (?, ?)