Compare commits

...
2 Commits
Author SHA1 Message Date
Gabriel20xx 20e9461d46 Sync shared snapshot from 3131937
Docker / Docker Build & Push (push) Successful in 4m1s
2026-09-09 22:25:06 +02:00
Gabriel20xx fc24ae2f60 Sync shared snapshot from 8d7d6ee 2026-09-09 20:49:41 +02:00
3 changed files with 109 additions and 5 deletions

No files matched your search

+15 -5
View File
@@ -531,17 +531,27 @@ func (s *Service) UpdateAccessSettings(w http.ResponseWriter, r *http.Request) {
writeError(w, http.StatusBadRequest, "loginRequired must be a boolean") writeError(w, http.StatusBadRequest, "loginRequired must be a boolean")
return return
} }
if _, err := s.db.Exec(r.Context(), ` if err := s.SetLoginRequired(r.Context(), *input.LoginRequired); err != nil {
INSERT INTO settings (key, value, updated_at)
VALUES ($1, $2, NOW())
ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value, updated_at = NOW()
`, loginRequiredSettingKey, strconv.FormatBool(*input.LoginRequired)); err != nil {
writeError(w, http.StatusInternalServerError, "access setting could not be saved") writeError(w, http.StatusInternalServerError, "access setting could not be saved")
return return
} }
writeJSON(w, http.StatusOK, map[string]bool{"loginRequired": *input.LoginRequired}) writeJSON(w, http.StatusOK, map[string]bool{"loginRequired": *input.LoginRequired})
} }
// SetLoginRequired writes the auth_required flag directly, the same one UpdateAccessSettings
// exposes to a manager-authenticated session - callers reach this from an X-Internal-Auth-gated
// route instead (see each service's own setLoginRequiredInternal), letting ProjectConfigurator's
// central "Require Login" toggle (ConfigWorkspace.svelte's loginControls) apply here without an
// admin session of its own.
func (s *Service) SetLoginRequired(ctx context.Context, required bool) error {
_, err := s.db.Exec(ctx, `
INSERT INTO settings (key, value, updated_at)
VALUES ($1, $2, NOW())
ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value, updated_at = NOW()
`, loginRequiredSettingKey, strconv.FormatBool(required))
return err
}
func (s *Service) Status(w http.ResponseWriter, r *http.Request) { func (s *Service) Status(w http.ResponseWriter, r *http.Request) {
if !s.enabled() { if !s.enabled() {
user := localProfile user := localProfile
@@ -0,0 +1,37 @@
{
"$comment": "Canonical 32-color brand palette. Each entry: hue (deg), dark-theme primary/fg, light-theme primary/fg. Formula: dark = hsl(h,85%,73%) [hsl(h,80%,40%) if 35<=h<=100], light = hsl(h,72%,50%) [hsl(h,80%,40%) if 35<=h<=100], dark_fg = hsl(h,55%,11%), light_fg = #ffffff.",
"colors": [
{ "name": "Vermilion", "hue": 8.5, "dark": "#f59080", "light": "#db3e24", "dark_fg": "#2b110d", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Tangerine", "hue": 17.5, "dark": "#fb923c", "light": "#c2410c", "dark_fg": "#2b1206", "light_fg": "#ffffff", "status": "used", "project": "Fork/Heretic" },
{ "name": "Marigold", "hue": 26.5, "dark": "#f5b380", "light": "#db7524", "dark_fg": "#2b1a0d", "light_fg": "#ffffff", "status": "used", "project": "Original/GameStream" },
{ "name": "Amber", "hue": 38.3, "dark": "#f5ca80", "light": "#b87d14", "dark_fg": "#2b200d", "light_fg": "#ffffff", "status": "used", "project": "Original/UnraidMonitor" },
{ "name": "Gold", "hue": 50.2, "dark": "#f5e280", "light": "#b89d14", "dark_fg": "#2b260d", "light_fg": "#ffffff", "status": "used", "project": "Core/OmniLogger" },
{ "name": "Honey", "hue": 62.0, "dark": "#f1f580", "light": "#b2b814", "dark_fg": "#2a2b0d", "light_fg": "#ffffff", "status": "used", "project": "Original/CraftStudio" },
{ "name": "Chartreuse", "hue": 73.9, "dark": "#daf580", "light": "#92b814", "dark_fg": "#242b0d", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Lime", "hue": 85.7, "dark": "#c3f580", "light": "#72b814", "dark_fg": "#1e2b0d", "light_fg": "#ffffff", "status": "used", "project": "Original/OutdoorGames" },
{ "name": "Spring Green","hue": 97.6, "dark": "#abf580", "light": "#51b814", "dark_fg": "#182b0d", "light_fg": "#ffffff", "status": "used", "project": "Core/ContentScanner" },
{ "name": "Shamrock", "hue": 109.4, "dark": "#94f580", "light": "#44db24", "dark_fg": "#122b0d", "light_fg": "#ffffff", "status": "used", "project": "Original/KioskDisplay" },
{ "name": "Emerald", "hue": 121.3, "dark": "#80f582", "light": "#24db28", "dark_fg": "#0d2b0d", "light_fg": "#ffffff", "status": "used", "project": "Fork/HordeWorker" },
{ "name": "Jade", "hue": 133.1, "dark": "#80f599", "light": "#24db4c", "dark_fg": "#0d2b13", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Clover", "hue": 142.1, "dark": "#22c55e", "light": "#16a34a", "dark_fg": "#052e14", "light_fg": "#ffffff", "status": "used", "project": "Original/SimpleCollection" },
{ "name": "Mint", "hue": 151.1, "dark": "#80f5bc", "light": "#24db83", "dark_fg": "#0d2b1d", "light_fg": "#ffffff", "status": "used", "project": "Original/MediaDesktop" },
{ "name": "Seafoam", "hue": 163.3, "dark": "#80f5d4", "light": "#24dba8", "dark_fg": "#0d2b23", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Turquoise", "hue": 175.5, "dark": "#80f5ec", "light": "#24dbce", "dark_fg": "#0d2b29", "light_fg": "#ffffff", "status": "used", "project": "Original/AutoCode" },
{ "name": "Aqua", "hue": 187.8, "dark": "#80e5f5", "light": "#24c3db", "dark_fg": "#0d272b", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Cyan", "hue": 200.0, "dark": "#80cef5", "light": "#249edb", "dark_fg": "#0d212b", "light_fg": "#ffffff", "status": "used", "project": "Core/CarrierNode" },
{ "name": "Sky Blue", "hue": 212.2, "dark": "#80b6f5", "light": "#2479db", "dark_fg": "#0d1b2b", "light_fg": "#ffffff", "status": "used", "project": "Original/MediaViewer" },
{ "name": "Cornflower", "hue": 221.2, "dark": "#3b82f6", "light": "#2563eb", "dark_fg": "#0a1733", "light_fg": "#ffffff", "status": "used", "project": "Original/CollabTable" },
{ "name": "Indigo", "hue": 230.8, "dark": "#99a1d7", "light": "#4355b9", "dark_fg": "#12162b", "light_fg": "#ffffff", "status": "used", "project": "Fork/Bitmagnet" },
{ "name": "Iris", "hue": 243.4, "dark": "#818cf8", "light": "#4f46e5", "dark_fg": "#12102e", "light_fg": "#ffffff", "status": "used", "project": "Original/PubliSafe" },
{ "name": "Periwinkle", "hue": 252.4, "dark": "#9880f5", "light": "#4a24db", "dark_fg": "#130d2b", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Violet", "hue": 264.0, "dark": "#ae80f5", "light": "#6d24db", "dark_fg": "#190d2b", "light_fg": "#ffffff", "status": "used", "project": "Original/InfiniteVideo" },
{ "name": "Purple", "hue": 275.6, "dark": "#c580f5", "light": "#9124db", "dark_fg": "#1f0d2b", "light_fg": "#ffffff", "status": "used", "project": "Core/ProjectConfigurator" },
{ "name": "Orchid", "hue": 287.2, "dark": "#dc80f5", "light": "#b424db", "dark_fg": "#250d2b", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Magenta", "hue": 298.8, "dark": "#f280f5", "light": "#d824db", "dark_fg": "#2b0d2b", "light_fg": "#ffffff", "status": "used", "project": "Fork/MegaBasterd" },
{ "name": "Fuchsia", "hue": 310.4, "dark": "#f580e0", "light": "#db24bb", "dark_fg": "#2b0d26", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Pink", "hue": 322.1, "dark": "#f580ca", "light": "#db2498", "dark_fg": "#2b0d20", "light_fg": "#ffffff", "status": "used", "project": "Core/ModerationHub" },
{ "name": "Rose", "hue": 333.7, "dark": "#f580b3", "light": "#db2474", "dark_fg": "#2b0d1a", "light_fg": "#ffffff", "status": "used", "project": "Original/SyncServer" },
{ "name": "Ruby", "hue": 345.3, "dark": "#f5809c", "light": "#db2451", "dark_fg": "#2b0d14", "light_fg": "#ffffff", "status": "reserved" },
{ "name": "Crimson", "hue": 356.9, "dark": "#f58086", "light": "#db242d", "dark_fg": "#2b0d0e", "light_fg": "#ffffff", "status": "used", "project": "Core/AuthGuard" }
]
}
+57
View File
@@ -0,0 +1,57 @@
# Brand color palette
Canonical 32-color palette for every webui in this workspace. Each project gets one unique
color (hue) as its default `--color-primary` / `--sc-primary`; no two projects share a hue.
14 colors are still unassigned — reserved for future projects.
Generation formula (given hue `h` in degrees):
- Dark-theme primary: `hsl(h, 85%, 73%)`, except `hsl(h, 80%, 40%)` for `35 <= h <= 100` (yellow/lime band, kept less washed-out)
- Light-theme primary: `hsl(h, 72%, 50%)`, except `hsl(h, 80%, 40%)` for `35 <= h <= 100`
- Dark-theme primary-fg (text on primary): `hsl(h, 55%, 11%)`
- Light-theme primary-fg: `#ffffff`
- Favicon: the dark-theme primary hex (matches this workspace's existing favicon convention)
The 5 colors marked "used, pre-existing" were already unique and good-looking before this
palette was formalized, so their exact original hex values were kept as-is (not
re-derived from the formula) and slotted into the nearest free hue.
| Name | Hue | Dark | Light | Status | Project |
|---|---|---|---|---|---|
| Vermilion | 8.5 | `#f59080` | `#db3e24` | reserved | — |
| Tangerine | 17.5 | `#fb923c` | `#c2410c` | used (pre-existing) | Fork/Heretic |
| Marigold | 26.5 | `#f5b380` | `#db7524` | used | Original/GameStream |
| Amber | 38.3 | `#f5ca80` | `#b87d14` | used | Original/UnraidMonitor |
| Gold | 50.2 | `#f5e280` | `#b89d14` | used | Core/OmniLogger |
| Honey | 62.0 | `#f1f580` | `#b2b814` | used | Original/CraftStudio |
| Chartreuse | 73.9 | `#daf580` | `#92b814` | reserved | — |
| Lime | 85.7 | `#c3f580` | `#72b814` | used | Original/OutdoorGames |
| Spring Green | 97.6 | `#abf580` | `#51b814` | used | Core/ContentScanner |
| Shamrock | 109.4 | `#94f580` | `#44db24` | used | Original/KioskDisplay |
| Emerald | 121.3 | `#80f582` | `#24db28` | used | Fork/HordeWorker |
| Jade | 133.1 | `#80f599` | `#24db4c` | reserved | — |
| Clover | 142.1 | `#22c55e` | `#16a34a` | used (pre-existing) | Original/SimpleCollection |
| Mint | 151.1 | `#80f5bc` | `#24db83` | used | Original/MediaDesktop |
| Seafoam | 163.3 | `#80f5d4` | `#24dba8` | reserved | — |
| Turquoise | 175.5 | `#80f5ec` | `#24dbce` | used | Original/AutoCode |
| Aqua | 187.8 | `#80e5f5` | `#24c3db` | reserved | — |
| Cyan | 200.0 | `#80cef5` | `#249edb` | used | Core/CarrierNode |
| Sky Blue | 212.2 | `#80b6f5` | `#2479db` | used | Original/MediaViewer |
| Cornflower | 221.2 | `#3b82f6` | `#2563eb` | used (pre-existing) | Original/CollabTable |
| Indigo | 230.8 | `#99a1d7` | `#4355b9` | used (pre-existing) | Fork/Bitmagnet |
| Iris | 243.4 | `#818cf8` | `#4f46e5` | used (pre-existing) | Original/PubliSafe |
| Periwinkle | 252.4 | `#9880f5` | `#4a24db` | reserved | — |
| Violet | 264.0 | `#ae80f5` | `#6d24db` | used | Original/InfiniteVideo |
| Purple | 275.6 | `#c580f5` | `#9124db` | used | Core/ProjectConfigurator |
| Orchid | 287.2 | `#dc80f5` | `#b424db` | reserved | — |
| Magenta | 298.8 | `#f280f5` | `#d824db` | used | Fork/MegaBasterd |
| Fuchsia | 310.4 | `#f580e0` | `#db24bb` | reserved | — |
| Pink | 322.1 | `#f580ca` | `#db2498` | used | Core/ModerationHub |
| Rose | 333.7 | `#f580b3` | `#db2474` | used | Original/SyncServer |
| Ruby | 345.3 | `#f5809c` | `#db2451` | reserved | — |
| Crimson | 356.9 | `#f58086` | `#db242d` | used | Core/AuthGuard |
Machine-readable version: `palette.json` in this directory.
When starting a new project, claim the next unclaimed reserved color (or generate a new
hue with the same formula, keeping at least ~10° of hue separation from every existing
entry above) and flip its status to "used" here.