feat(manager): the venue's identity (Settings -> Identity): name, slogan, named colours, logos, guest Wi-Fi, contact details
Set once (GET/PUT /api/identity, venue.name + venue.identity); every colour field offers the venue's colours first (VenueColoursProvider in @xenia/ui); signage screens get the identity and the venue's time zone with their venue and are told on a change; logos are protected in the media library; wifiQr() for the join-the-network code. Plan 6R.14, F-111. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -508,3 +508,14 @@ export function shapeName(w, h) {
|
||||
const d = g(Math.round(w), Math.round(h)) || 1
|
||||
return `${Math.round(w) / d}:${Math.round(h) / d}`
|
||||
}
|
||||
|
||||
// ── the venue's identity (6R.14) ──────────────────────────────────────────────
|
||||
|
||||
/** The text of a QR code that joins a Wi-Fi network ("WIFI:T:WPA;S:…;P:…;;"), or '' without a network name. */
|
||||
export function wifiQr(wifi) {
|
||||
if (!wifi?.ssid) return ''
|
||||
const esc = v => String(v).replace(/([\;,:"])/g, '\$1')
|
||||
const sec = wifi.security === 'nopass' ? 'nopass' : wifi.security === 'WEP' ? 'WEP' : 'WPA'
|
||||
const pw = sec !== 'nopass' && wifi.password ? `P:${esc(wifi.password)};` : ''
|
||||
return `WIFI:T:${sec};S:${esc(wifi.ssid)};${pw}${wifi.hidden ? 'H:true;' : ''};`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user