feat(manager): the setup wizard and the shell on v2; all of src on the v2 rules (platform-v2 step 6.14b)

- setup wizard (src/pages/setup): welcome (pick the language: the wizard switches at once), the owner's account, the venue
  (kind, name, staff language, time zone), an optional lock-screen PIN, finish -> sign in; English and Greek
- shell (src/shell): AppLayout (license banner in both languages, header, lock button, idle lock / sign-out), Sidebar on a
  new 'nav' token set in @xenia/ui (light + dark), ProfileDialog (name, username, password, 4-6 digit PIN), licenseContext;
  App.jsx loads the session and the setup state with react-query (no setState in effects); the header's dead search box gone
- Management -> Tables -> List (src/pages/tables, was TablesConfigTab): zones as tabs (drag to reorder), zone name / prefix /
  colour, add many numbered on, a table's name (6 chars) / zone / seats, twice-used names flagged, off / on / delete,
  pick several to move, rename in a series or delete (says how many failed)
- the old src/ui kit, layouts/, components/Sidebar + EditProfileModal, the 'primary' palette and the .btn/.card/.input classes deleted;
  NotificationBell / UserMenuButton on tokens; @xenia/ui: nav tokens, 'scrim' in the Tailwind preset
- v2.json paths = src (the guards cover all of it); npm run lint = eslint src; argsIgnorePattern for components in JSX
- tests: shell.test.mjs (3), e2e setup.mjs (new: a fresh install through the wizard in Greek to the overview, in run-all),
  manager.mjs 'tables list' (zone, 3 tables, rename series, profile PIN, rail tokens)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 20:01:23 +02:00
co-authored by Claude Opus 5.5
parent f6fcfb7736
commit 294b769850
40 changed files with 1680 additions and 2766 deletions
@@ -50,28 +50,28 @@ export default function UserMenuButton({ displayName, onEditProfile, onSignOut }
<div className="relative" ref={ref}>
<button
onClick={() => setOpen(o => !o)}
className="flex items-center gap-1 text-[13px] text-slate-600 font-medium hover:text-slate-900 transition-colors"
className="flex items-center gap-1 text-[13px] text-ink-2 font-medium hover:text-ink transition-colors"
aria-haspopup="menu"
aria-expanded={open}
data-testid="user-menu"
>
{displayName}
<ChevronDown className={`h-3.5 w-3.5 text-slate-400 transition-transform ${open ? 'rotate-180' : ''}`} />
<ChevronDown className={`h-3.5 w-3.5 text-ink-3 transition-transform ${open ? 'rotate-180' : ''}`} />
</button>
{open && (
<div className="absolute right-0 top-full mt-1.5 w-52 rounded-xl border border-slate-200 bg-white shadow-lg py-1 z-50" role="menu">
<div className="absolute right-0 top-full mt-1.5 w-52 rounded-xl border border-line bg-surface shadow-lg py-1 z-50" role="menu">
<button
role="menuitem"
onClick={() => { setOpen(false); onEditProfile() }}
className="flex w-full items-center gap-2.5 px-3.5 py-2 text-[13px] text-slate-700 hover:bg-slate-50 transition-colors"
className="flex w-full items-center gap-2.5 px-3.5 py-2 text-[13px] text-ink hover:bg-surface-2 transition-colors"
>
<User className="h-3.5 w-3.5 text-slate-400" />
<User className="h-3.5 w-3.5 text-ink-3" />
{t('profile.edit')}
</button>
<div className="my-1 border-t border-slate-100" />
<div className="flex items-center gap-2.5 px-3.5 pt-1.5 pb-1 text-[11px] font-semibold uppercase tracking-wide text-slate-400">
<div className="my-1 border-t border-line" />
<div className="flex items-center gap-2.5 px-3.5 pt-1.5 pb-1 text-[11px] font-semibold uppercase tracking-wide text-ink-3">
<Languages className="h-3.5 w-3.5" />
{t('profile.language')}
</div>
@@ -82,18 +82,18 @@ export default function UserMenuButton({ displayName, onEditProfile, onSignOut }
aria-checked={lng === language}
lang={lng}
onClick={() => chooseLanguage(lng)}
className="flex w-full items-center gap-2.5 px-3.5 py-2 pl-9 text-[13px] text-slate-700 hover:bg-slate-50 transition-colors"
className="flex w-full items-center gap-2.5 px-3.5 py-2 pl-9 text-[13px] text-ink hover:bg-surface-2 transition-colors"
>
<span className="flex-1 text-left">{LANGUAGE_NAMES[lng]}</span>
{lng === language && <Check className="h-3.5 w-3.5 text-primary-700" />}
{lng === language && <Check className="h-3.5 w-3.5 text-accent-ink" />}
</button>
))}
<div className="my-1 border-t border-slate-100" />
<div className="my-1 border-t border-line" />
<button
role="menuitem"
onClick={() => { setOpen(false); onSignOut() }}
className="flex w-full items-center gap-2.5 px-3.5 py-2 text-[13px] text-rose-500 hover:bg-rose-50 transition-colors"
className="flex w-full items-center gap-2.5 px-3.5 py-2 text-[13px] text-danger-ink hover:bg-danger-soft transition-colors"
>
<LogOut className="h-3.5 w-3.5" />
{t('profile.signOut')}