feat: the venue's identity in every app: its colour as the accent of the waiters' phones and every terminal screen, customer display looks on the identity, the signage logo widget falls back to the venue's logo
Settings -> Venue -> accent "The venue's identity" (venue.theme = identity): bootstrap carries the identity's first colour and logos; @xenia/ui applyVenueTheme makes the accent tokens (light and dark, readable foregrounds) from it. A display look's "Colours and logo" can be the venue's identity. Plan 6R.20, F-117. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import { i18n } from './i18n'
|
||||
import useAuthStore from './store/authStore'
|
||||
import useShiftStore from './store/shiftStore'
|
||||
import useThemeStore from './store/themeStore'
|
||||
import { applyVenueTheme } from '@xenia/ui'
|
||||
import useTableColourStore from './store/tableColourStore'
|
||||
import useConnectionStore from './store/connectionStore'
|
||||
import useWaiterFavoritesStore from './store/waiterFavoritesStore'
|
||||
@@ -333,16 +334,19 @@ function OfflineListener() {
|
||||
}
|
||||
|
||||
// Light / dark from the user menu (per phone), the accent colour from the venue (bootstrap
|
||||
// venue.theme, Settings → Venue; plan step 4.6). The waiter's colours are @xenia/ui tokens.
|
||||
// venue.theme, Settings → Venue; plan step 4.6; "identity": the venue's own colour, 6R.20). The
|
||||
// waiter's colours are @xenia/ui tokens.
|
||||
function ThemeApplier() {
|
||||
const dark = useThemeStore(s => s.dark)
|
||||
const venueTheme = useAccess()?.venue?.theme || 'amber'
|
||||
const venue = useAccess()?.venue
|
||||
const venueTheme = venue?.theme || 'amber'
|
||||
const colour = venue?.identity?.colour
|
||||
useEffect(() => {
|
||||
document.documentElement.setAttribute('data-theme', dark ? 'dark' : 'light')
|
||||
}, [dark])
|
||||
useEffect(() => {
|
||||
document.documentElement.setAttribute('data-venue-theme', venueTheme)
|
||||
}, [venueTheme])
|
||||
applyVenueTheme(venueTheme === 'identity' && !colour ? 'amber' : venueTheme, colour)
|
||||
}, [venueTheme, colour])
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user