feat(waiter): the look on the shared tokens; the venue's colour (platform-v2 step 4.6)
- The waiter's --bg/--text/--accent… are made of @xenia/ui tokens: light / dark (user menu) and the venue's accent reach every screen; the 751 colour literals in waiter_pwa/src became tokens (by hue family and lightness), hex-alpha suffixes became fade() (color-mix), fixing 'var(--accent)18' tints that never showed. - @xenia/ui: new `special` (violet: offers, discounts, deals; contrast-tested) and `on-colour` tokens. - Setting venue.theme (teal | amber | blue | violet | rose, default amber), bootstrap venue.theme, manager Settings → Venue → Colour; the waiter sets data-venue-theme and the theme before the first render. - Guard tests/no-colours.test.mjs; tests/e2e/waiter_look.mjs (every page light + dark, side-by-side compare page); waiter e2e +3; backend test_venue_theme.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import useConnectionStore from '../store/connectionStore'
|
||||
import { fade } from '../logic/colour'
|
||||
|
||||
/**
|
||||
* A 3px bar pinned to the very top of the screen (above the header).
|
||||
@@ -17,10 +18,10 @@ export default function ConnectivityBar() {
|
||||
const isReconnecting = status === 'reconnecting'
|
||||
|
||||
const color = isOnline
|
||||
? (liveAlive ? '#22c55e' : '#3b82f6')
|
||||
? (liveAlive ? 'var(--x-success)' : 'var(--x-info)')
|
||||
: isReconnecting
|
||||
? '#f59e0b'
|
||||
: '#ef4444'
|
||||
? 'var(--x-warning)'
|
||||
: 'var(--x-danger)'
|
||||
|
||||
const animated = !isOnline
|
||||
|
||||
@@ -67,7 +68,7 @@ export default function ConnectivityBar() {
|
||||
style={{
|
||||
'--cb-color': color,
|
||||
backgroundColor: color,
|
||||
boxShadow: `0 0 6px 1px ${color}99`,
|
||||
boxShadow: `0 0 6px 1px ${fade(color, 0.6)}`,
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user