chore: build
This commit is contained in:
@@ -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 (?, ?)
|
||||
|
||||
@@ -52,7 +52,9 @@ func GetPublicSettings(c *gin.Context) {
|
||||
"client_color_secondary": settings.ClientColorSecondary,
|
||||
"client_color_success": settings.ClientColorSuccess,
|
||||
"client_color_danger": settings.ClientColorDanger,
|
||||
"client_color_warning": settings.ClientColorWarning,
|
||||
"client_color_warning": settings.ClientColorWarning,
|
||||
"client_title_gradient_from": settings.ClientTitleGradientFrom,
|
||||
"client_title_gradient_to": settings.ClientTitleGradientTo,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -118,4 +118,7 @@ type AppSettings struct {
|
||||
ClientColorSuccess string `json:"client_color_success"`
|
||||
ClientColorDanger string `json:"client_color_danger"`
|
||||
ClientColorWarning string `json:"client_color_warning"`
|
||||
// Dégradé du titre boutique sur le site web client
|
||||
ClientTitleGradientFrom string `json:"client_title_gradient_from"`
|
||||
ClientTitleGradientTo string `json:"client_title_gradient_to"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user