feat(web): ambient banner, snooze/focus actions, settings controls

This commit is contained in:
2026-06-05 21:51:49 -04:00
parent fa178a1fd2
commit aaed1ad265
5 changed files with 82 additions and 0 deletions
+8
View File
@@ -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"})