feat(ui): the QR card shared in @xenia/ui/qr (platform-v2 step 6.14c)
- QrCode (a QR on a light tile, optional caption; framed or not) in packages/ui, on its own subpath so only the apps that show one need qrcode.react (an optional peer); x-qr styles keep the code dark on light in dark themes - used by the terminal's customer display, the manager's online-ordering link, table QR codes and Settings' pairing QR (four copies of the same markup gone) - the money pad and the order line row stay where they are: the manager's payment is the phones' cash / card choice (no cash given, change or split) and its order lines are not the counter's cart lines, so neither has a second user; the signage slides keep their own QR (inline styles scaled to the TV) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
// The POS's state arrives live (`display.state`, addressed to this screen only); a settings
|
||||
// change re-reads it (`display.settings`). GET /api/display/state on start and reconnect.
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { QRCodeSVG } from 'qrcode.react'
|
||||
import { useFormat, useTranslation } from '@xenia/i18n'
|
||||
import { applyTheme, getStoredTheme } from '@xenia/ui'
|
||||
import { QrCode } from '@xenia/ui/qr'
|
||||
import client from '../../api/client'
|
||||
import { useLiveEvent, useLiveEvents } from '../../device/context'
|
||||
import { idleParts, PAID_MS, slideAt, viewOf } from './logic'
|
||||
@@ -117,7 +117,7 @@ function IdleView({ idle, venue, now, linked }) {
|
||||
{p.name && <h1 className="text-7xl font-semibold" data-testid="display-name">{p.name}</h1>}
|
||||
{p.qr && (
|
||||
<div className="grid justify-items-center gap-4" data-testid="display-qr" data-link={p.qr}>
|
||||
<div className="p-5 rounded-card bg-surface shadow-raised"><QRCodeSVG value={p.qr} size={320} includeMargin={false} /></div>
|
||||
<QrCode value={p.qr} size={320} className="shadow-raised rounded-card" />
|
||||
{p.caption && <p className="text-4xl font-semibold">{p.caption}</p>}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user