feat(machine): operator branding — optional logo-dark.png variant
Sibling-file convention: drop a logo-dark.png alongside logo.png in /var/lib/bitspire/branding/ and the renderer uses it whenever the effective color mode is dark, falling back to logo.png when absent. No branding.json change — the file name itself is the contract. Wiring: - electron/main.ts:loadBranding() reads logo-dark.png and base64-encodes it into logoDarkDataUrl on the IPC payload - composables/useTheme.ts exposes an `isDark` computed that resolves the 'system' colorMode via the prefers-color-scheme media query (and reacts to OS-level dark-mode changes via the existing listener) - composables/useBranding.ts switches logoUrl reactively based on isDark - IdleView already binds to logoUrl — no template change needed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f589b1c078
commit
b6169da45d
6 changed files with 57 additions and 14 deletions
|
|
@ -10,9 +10,10 @@
|
|||
#
|
||||
# Expected files in <branding-dir>:
|
||||
# logo.png — operator logo (any reasonable size; rendered ~12vh)
|
||||
# logo-dark.png — optional dark-mode variant; falls back to logo.png if absent
|
||||
# branding.json — { title, theme, custom_colors{...}, custom_colors.dark{...} }
|
||||
#
|
||||
# Either file is optional; the on-disk schema in /var/lib/bitspire/branding/
|
||||
# Any file is optional; the on-disk schema in /var/lib/bitspire/branding/
|
||||
# matches whatever <branding-dir> contains (rsync --delete).
|
||||
set -euo pipefail
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue