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
Owner

Part of inbuxa/inbuxa-server#410 (dark-mode logo, community t/304).

The console's logo now follows its theme: the dark theme probes /logo?theme=dark, the light one /logo, each once per page load on first use. A logo that broke in one theme no longer hides the other's. Against a server without the parameter, it answers with the ordinary logo, so nothing changes there.

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

Checks run locally: typecheck, lint, i18n:check, npm test (1134 passed, 2 new), release-version, changelog-check, listen-ipv6 tests, build, notice-check.

Part of inbuxa/inbuxa-server#410 (dark-mode logo, community t/304). The console's logo now follows its theme: the dark theme probes `/logo?theme=dark`, the light one `/logo`, each once per page load on first use. A logo that broke in one theme no longer hides the other's. Against a server without the parameter, it answers with the ordinary logo, so nothing changes there. The dark logo fields themselves come from the server's schema (Settings › System › Branding, domain and tenant forms), so no form change is needed here. Checks run locally: typecheck, lint, i18n:check, `npm test` (1134 passed, 2 new), release-version, changelog-check, listen-ipv6 tests, build, notice-check.
jcoffey-dev added 1 commit 2026-11-18 20:41:24 +00:00
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
8eb0ba2f21
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.
jcoffey-dev merged commit 03d497c7b5 into main 2026-11-18 20:44:09 +00:00
jcoffey-dev deleted branch feat/410-dark-logo 2026-11-18 20:44:10 +00:00
Sign in to join this conversation.