feat(web): ambient banner, snooze/focus actions, settings controls
This commit is contained in:
@@ -50,6 +50,14 @@ func (s *Server) handlePostSettings(c *gin.Context) {
|
||||
if req.AWURL == "" {
|
||||
req.AWURL = s.settings.AWURL
|
||||
}
|
||||
// Likewise preserve ambient fields when a caller omits them, so a partial
|
||||
// POST never clobbers a configured ambient dial.
|
||||
if req.AmbientMode == "" {
|
||||
req.AmbientMode = s.settings.AmbientMode
|
||||
}
|
||||
if req.AmbientCadenceSecs <= 0 {
|
||||
req.AmbientCadenceSecs = s.settings.AmbientCadenceSecs
|
||||
}
|
||||
s.settingsMu.Unlock()
|
||||
if apply == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "settings not wired"})
|
||||
|
||||
Reference in New Issue
Block a user