Logo: show the logo set for dark mode in the dark theme #245

Merged
jcoffey-dev merged 1 commits from feat/410-dark-logo into main 2026-11-18 20:44:09 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 8eb0ba2f21 Logo: show the logo set for dark mode in the dark theme
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 17s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m16s
The console showed the server's logo from /logo in both themes, so a logo
drawn for a light background was the only choice on a dark one. The server
now takes `?theme=dark` and answers with the logo an admin set for dark mode
(logoUrlDark, or a domain's or tenant's logoDark), falling back to the
ordinary one (inbuxa-server#410, branding BT-27).

The logo cache probes each theme's /logo once per page load, on first use:
the light theme as before, the dark theme with ?theme=dark. The header logo
follows the theme switch, and a logo that broke in one theme no longer
hides the other theme's. A server that predates the parameter ignores it
and answers with its ordinary logo, so nothing changes against it.

The dark logo fields themselves come from the served schema (Settings ›
System › Branding, and each domain's and tenant's form), so the forms need
no change here.

Test: the cache asks /logo?theme=dark in the dark theme and /logo in the
light one, each once, and follows the page's dark class when no theme is
given.
2026-11-18 13:36:14 -07:00