feat(stores): promote events auth state to Svelte 5 PersistedState

Creates ae_events_stores__auth.svelte.ts with PersistedState keyed
'ae_events_auth_loc' for auth__person and auth__kv (presenter/session
sign-in state). Migrated 10 component files from $events_loc.auth__* to
events_auth_loc.current.auth__*.

Also fixed stale pres_mgmt stragglers: $events_loc.pres_mgmt.* refs in
presenter_obj_li.svelte, presenter_page_menu.svelte, and [presenter_id]/
+page.svelte now use pres_mgmt_loc.current.* directly.

show_details boolean moved from events_loc to leads_loc (it belongs in
the leads module — one bind in ae_tab__manage.svelte).

auth__person, auth__kv, show_details, events_cfg_json, event_id removed
from events_local_data_struct. events_loc now only carries ver, title,
and qry__* prefs.

svelte-check: 0 errors, 0 warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-11 16:19:49 -04:00
parent 27c775d816
commit 83c9b9fd4f
17 changed files with 110 additions and 97 deletions

View File

@@ -28,10 +28,6 @@ const events_local_data_struct: key_val = {
name: 'Aether - Events',
title: `OSIT's Æ Events`,
events_cfg_json: {},
event_id: null,
// all, disabled, enabled
qry__enabled: 'enabled',
// all, hidden, not_hidden
@@ -39,27 +35,9 @@ const events_local_data_struct: key_val = {
qry__limit: 20,
qry__offset: 0,
// The show details is intended for things like meta data and additional details that are not always needed.
show_details: false,
auth__person: {}, // allow, id, name, email, passcode, etc
// The auth__entered_key (usually email or person_id) and auth__entered_passcode is found under events_sess.entered_key and events_sess.entered_passcode because it should be temporary.
// auth__entered_passcode: null,
// auth__kv tracks which IDs the browser client is permitted to access.
// Each entry is an ID mapped to true, false, 'read', or 'write'.
// Keys should be no older than a configurable max age (checked on read).
auth__kv: {
event: {},
exhibit: {},
location: {},
session: {},
presentation: {},
presenter: {},
person: {}
},
// Event Presentation Launcher — see ae_events_stores__launcher_defaults.ts
// auth__person and auth__kv have been promoted to events_auth_loc (ae_events_stores__auth.svelte.ts).
// show_details has been moved to leads_loc (ae_events_stores__leads_defaults.ts).
// events_cfg_json and event_id were unused — removed.
// badges, leads, pres_mgmt, launcher have all been promoted to their own PersistedState stores.
};