feat: adapt home appearance to wallpaper colors
Build and publish container images / images (push) Successful in 10m56s
Release container images / release (push) Successful in 18s

This commit is contained in:
Anya Tokugawa committed 2026-11-07 22:51:56 +09:00
1 parent c7aa4fd7dd
commit 0964fdc5b7
23 files changed
+628 -32

No files matched your search

+19
View File
@@ -290,6 +290,11 @@ func (s *Server) handleConfig(
}
case "home":
palette, paletteErr := s.parseHomePalette(domainUUID, r.Form)
if paletteErr != nil {
http.Error(w, paletteErr.Error(), http.StatusBadRequest)
return
}
if controlled, e := s.store.DomainEntryControlled(domainUUID); e != nil || controlled {
http.Error(w, translate(s.getLocale(domainUUID), "periodical.controlled"), http.StatusConflict)
return
@@ -344,6 +349,10 @@ func (s *Server) handleConfig(
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if err = s.saveHomePalette(domainUUID, palette); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if err = s.store.SetConfigInDomain(domainUUID, "home_wallpaper_opacity", strconv.Itoa(wallpaperOpacity)); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
@@ -463,6 +472,11 @@ func (s *Server) handleConfig(
}
case "home-appearance":
palette, paletteErr := s.parseHomePalette(domainUUID, r.Form)
if paletteErr != nil {
http.Error(w, paletteErr.Error(), http.StatusBadRequest)
return
}
if controlled, e := s.store.DomainEntryControlled(domainUUID); e != nil || controlled {
http.Error(w, translate(s.getLocale(domainUUID), "periodical.controlled"), http.StatusConflict)
return
@@ -472,6 +486,10 @@ func (s *Server) handleConfig(
http.Error(w, parseErr.Error(), http.StatusBadRequest)
return
}
if err = s.saveHomePalette(domainUUID, palette); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if err = s.store.SetConfigInDomain(domainUUID, "home_glass_transparency", strconv.Itoa(glassTransparency)); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
@@ -1064,6 +1082,7 @@ func (s *Server) handleConfig(
"HomeWallpaperPath": homeWallpaperPath,
"HomeWallpaperOpacity": homeWallpaperOpacity,
"HomeGlassTransparency": s.homeGlassTransparency(domainUUID),
"HomePalette": s.homePalette(domainUUID),
"HomeLayout": s.homeLayout(s.domainUUIDForRequest(r)),
"HomeBookmarks": s.homeBookmarksText(s.domainUUIDForRequest(r)),
"VirtualFolderPages": s.getVirtualFolderPages(s.domainUUIDForRequest(r)),