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:
Padreug 2026-05-25 15:01:55 +02:00
commit b6169da45d
6 changed files with 57 additions and 14 deletions

View file

@ -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