From f5f00108aae6875b1426f07c9a1551bc9e298cef Mon Sep 17 00:00:00 2001 From: Patrick Mulligan Date: Fri, 27 Feb 2026 10:57:33 -0500 Subject: [PATCH] feat(machine): add light/dark mode toggle with semantic color styling Replace hardcoded Tailwind colors (bg-white/5, text-green-400, bg-black/30, etc.) with theme-aware semantic classes (bg-card, text-success, text-bitcoin, bg-destructive/20) across CashInView and CashOutView. Add colorMode support to useTheme composable with localStorage persistence and system preference detection. QRCode component now reacts to theme/mode changes via MutationObserver. Debug panel includes Light/Dark/System toggle. Co-Authored-By: Claude Opus 4.6 --- apps/machine/src/App.vue | 28 ++++++++- apps/machine/src/components/QRCode.vue | 20 ++++++- apps/machine/src/composables/useTheme.ts | 50 +++++++++++++++- apps/machine/src/views/CashInView.vue | 75 +++++++++++------------- apps/machine/src/views/CashOutView.vue | 61 ++++++++----------- 5 files changed, 151 insertions(+), 83 deletions(-) diff --git a/apps/machine/src/App.vue b/apps/machine/src/App.vue index 74aaa6a..56e87f3 100644 --- a/apps/machine/src/App.vue +++ b/apps/machine/src/App.vue @@ -6,7 +6,7 @@ import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' const atmStore = useAtmStore() -const { current: currentTheme, themes } = useTheme() +const { current: currentTheme, themes, colorMode } = useTheme() const debugExpanded = ref(false) const network = import.meta.env.VITE_NETWORK || 'regtest' const isElectron = typeof window !== 'undefined' && window.electronAPI !== undefined @@ -122,6 +122,32 @@ function toggleLiveServices() { {{ theme.label }} +
+ + + +