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:
2026-11-22 13:10:58 +02:00
co-authored by Claude Opus 5.5
parent 1c8d45e00c
commit 2a38602d45
25 changed files with 663 additions and 8 deletions
+17
View File
@@ -0,0 +1,17 @@
// The identity form (6R.14): what it sends.
import { test } from 'node:test'
import assert from 'node:assert/strict'
import { identityBody, newColour } from '../src/pages/Settings/sections/identityLogic.js'
test('the identity as it is saved: logos as ids, empty texts as null, names trimmed', () => {
const body = identityBody({ name: ' Xenia ', slogan: ' ', colours: [{ name: ' Main ', colour: '#112233' }], logos: { main: { id: 4, card: '/x' } },
wifi: { ssid: 'Guests', hidden: 1 }, contact: { phone: ' 123 ', email: '' } })
assert.equal(body.name, 'Xenia')
assert.equal(body.slogan, null)
assert.deepEqual(body.colours, [{ name: 'Main', colour: '#112233' }])
assert.deepEqual(body.logos, { main: 4, light: null, dark: null, icon: null })
assert.deepEqual(body.wifi, { ssid: 'Guests', password: null, security: 'WPA', hidden: true, note: null })
assert.equal(body.contact.phone, '123')
assert.equal(body.contact.email, null)
assert.equal(newColour(1, 'x').name, 'x')
})
+1 -1
View File
@@ -15,7 +15,7 @@ const v2 = JSON.parse(readFileSync(path.join(ROOT, 'v2.json'), 'utf8'))
const DATA = new Set([
'src/pages/signage/signageLogic.js', 'src/pages/signage/SignageFields.jsx', 'src/pages/signage/SlideEditor.jsx',
'src/pages/signage/MenuEditor.jsx', 'src/pages/platform/DeviceConfigFields.jsx', 'src/pages/products/categoryColours.js',
'src/pages/Settings/sections/venueColours.js',
'src/pages/Settings/sections/venueColours.js', 'src/pages/Settings/sections/identityLogic.js',
])
const GREEK = /[Ͱ-Ͽἀ-῿]/
const COLOUR = [