diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b7670e20..e3e45067 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -11,13 +11,13 @@ import '../app.css'; // *** Import other supporting libraries - import { - ArrowBigRight, - CircleX, - RefreshCw, - RefreshCcw, - RefreshCcwDot - } from '@lucide/svelte'; + // import { + // ArrowBigRight, + // CircleX, + // RefreshCw, + // RefreshCcw, + // RefreshCcwDot + // } from '@lucide/svelte'; // Highlight JS import hljs from 'highlight.js/lib/core'; @@ -36,11 +36,11 @@ hljs.registerLanguage('typescript', typescript); // *** Import Aether specific variables and functions - import Analytics from '$lib/app_components/analytics.svelte'; + // import Analytics from '$lib/app_components/analytics.svelte'; import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/stores/ae_stores'; - import { events_loc, events_slct } from '$lib/stores/ae_events_stores'; + // import { events_loc, events_slct } from '$lib/stores/ae_events_stores'; - import MyClipboard from '$lib/app_components/e_app_clipboard.svelte'; + // import MyClipboard from '$lib/app_components/e_app_clipboard.svelte'; import E_app_debug_menu from '$lib/app_components/e_app_debug_menu.svelte'; import E_app_sys_menu from '$lib/app_components/e_app_sys_menu.svelte'; @@ -50,18 +50,18 @@ } let { data, children }: Props = $props(); - + // STABLE DERIVATION: Using prop data directly to avoid store loops let ae_acct = $derived(data[data.account_id]); let flag_clear_idb: boolean = $state(false); let flag_clear_local: boolean = $state(false); let flag_clear_sess: boolean = $state(false); - let flag_reload: boolean = $state(false); + let flag_reload: boolean = $state(false); - let flag_new_ver: boolean = $state(false); - let flag_expired: boolean = $state(false); - let flag_denied: boolean = $state(false); + let flag_new_ver: boolean = $state(false); + let flag_expired: boolean = $state(false); + let flag_denied: boolean = $state(false); // Connection Status let is_offline = $derived(browser && online.current === false); @@ -92,7 +92,7 @@ // Restore structural integrity if clobbered if (!new_loc.sys_menu) new_loc.sys_menu = { hide: false, hide_access_type: false, expand_access_type: false, hide_edit_mode: false, expand_edit_mode: false, hide_user: false, expand_user: false, hide_theme: false, expand_theme: false, hide_cfg: false, expand_cfg: false }; if (!new_loc.debug_menu) new_loc.debug_menu = { hide: false, expand: false }; - + if (JSON.stringify(current_loc) !== JSON.stringify(new_loc)) { $ae_loc = new_loc; } @@ -149,7 +149,7 @@ if (flag_clear_local) clear_local(); if (flag_clear_sess) clear_sess(); - + console.log("ROOT: Executing throttled reload"); invalidateAll(); }); @@ -160,10 +160,10 @@ let is_hydrating = $state(true); $effect(() => { if (!browser) return; - + // Theme DOM update document.documentElement.setAttribute('data-theme', $ae_loc?.theme_name ?? 'nouveau'); - + // Hydration overlay timer if ($ae_loc?.account_id) { const timer = setTimeout(() => is_hydrating = false, 500); @@ -229,7 +229,7 @@ {#if browser && (is_offline || api_unreachable)} -
+
{is_offline ? 'Offline' : api_error_msg}
@@ -237,9 +237,9 @@ {#if browser && $ae_loc?.allow_access} {@render children?.()} - + {#if is_hydrating} -
+
Hydrating Aether...
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 35d6b4f8..87de4b7b 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1,10 +1,10 @@ /** @type {import('./$types').LayoutLoad} */ // console.log(`ae_root +layout.ts: start`); -import { error } from '@sveltejs/kit'; +// import { error } from '@sveltejs/kit'; import { lookup_site_domain_v3 } from '$lib/ae_core/ae_core__site'; import type { key_val } from '$lib/stores/ae_stores'; -import type { ae_SiteDomain } from '$lib/types/ae_types'; +// import type { ae_SiteDomain } from '$lib/types/ae_types'; export const ssr = false; export const prerender = false; @@ -17,8 +17,8 @@ import { PUBLIC_AE_API_PATH, PUBLIC_AE_API_SECRET_KEY, PUBLIC_AE_API_CRUD_SUPER_KEY, - PUBLIC_AE_NO_ACCOUNT_ID, - PUBLIC_AE_NO_ACCOUNT_ID_TOKEN + // PUBLIC_AE_NO_ACCOUNT_ID, + // PUBLIC_AE_NO_ACCOUNT_ID_TOKEN } from '$env/static/public'; const api_base_url = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_SERVER}:${PUBLIC_AE_API_PORT}${PUBLIC_AE_API_PATH}`; @@ -28,8 +28,8 @@ const api_secret_key = PUBLIC_AE_API_SECRET_KEY; const api_crud_super_key = PUBLIC_AE_API_CRUD_SUPER_KEY; const ae_account_id: null | string = null; -const ae_no_account_id = PUBLIC_AE_NO_ACCOUNT_ID; -const ae_no_account_id_token = PUBLIC_AE_NO_ACCOUNT_ID_TOKEN; +// const ae_no_account_id = PUBLIC_AE_NO_ACCOUNT_ID; +// const ae_no_account_id_token = PUBLIC_AE_NO_ACCOUNT_ID_TOKEN; const ae_api_init: key_val = { ver: '2024-08-11_11', @@ -56,10 +56,10 @@ export async function load({ fetch, params, parent, route, url }) { let account_id: any; const ae_acct: key_val = { - api: { + api: { ...ae_api_init, headers: { ...ae_api_headers } // Local clone - }, + }, ds: {}, loc: { account_id: '', @@ -156,7 +156,7 @@ export async function load({ fetch, params, parent, route, url }) { site_id: native_device_config.site_id || native_device_config.site_id_random, site_domain_id: native_device_config.site_domain_id || native_device_config.site_domain_id_random, }; - + // Inject native device metadata into the location state with SAFE MERGE if (native_device_config.native_device) { const incoming_dev = native_device_config.native_device; @@ -165,7 +165,7 @@ export async function load({ fetch, params, parent, route, url }) { if (incoming_dev.event_device_id_random) incoming_dev.event_device_id = incoming_dev.event_device_id_random; if (incoming_dev.event_id_random) incoming_dev.event_id = incoming_dev.event_id_random; if (incoming_dev.id_random) incoming_dev.id = incoming_dev.id_random; - + // 1. Recover existing user overrides from localStorage let existing_dev = {}; try { @@ -205,13 +205,13 @@ export async function load({ fetch, params, parent, route, url }) { if (!result) { try { if (log_lvl) console.log(`ROOT LOAD: No cache. Starting site lookup V3 for ${fqdn}...`); - + // Use dedicated Agent Key for Bootstrap and include the unauthenticated bypass header ONLY for this request - const bootstrap_api_cfg = { + const bootstrap_api_cfg = { ...ae_api_init, api_secret_key: 'IDF68Em5X4HTZlswRNgepQ', - headers: { - ...ae_api_init.headers, + headers: { + ...ae_api_init.headers, 'x-aether-api-key': 'IDF68Em5X4HTZlswRNgepQ', 'x-no-account-id': 'bypass' // Force explicit bypass for bootstrap } @@ -259,7 +259,7 @@ export async function load({ fetch, params, parent, route, url }) { const json_data = result; // ... rest of the mapping logic ... - account_id = json_data.account_id || json_data.account_id_random || 'ghost'; + account_id = json_data.account_id || 'ghost'; data_struct.account_id = account_id; ae_acct.account_id = account_id; @@ -274,8 +274,8 @@ export async function load({ fetch, params, parent, route, url }) { ae_loc_init['account_code'] = json_data.account_code || 'ghost'; ae_loc_init['account_name'] = json_data.account_name || 'Ghost Account'; - ae_loc_init['site_id'] = json_data.site_id || json_data.site_id_random || 'ghost'; - ae_loc_init['site_domain_id'] = json_data.site_domain_id || json_data.site_domain_id_random || 'ghost'; + ae_loc_init['site_id'] = json_data.site_id || 'ghost'; + ae_loc_init['site_domain_id'] = json_data.site_domain_id || json_data.site_domain_id || 'ghost'; ae_loc_init['site_enable'] = json_data.enable || '1'; ae_loc_init['site_header_image_path'] = json_data.header_image_path || ''; ae_loc_init['site_style_href'] = json_data.style_href || ''; diff --git a/src/routes/core/+page.svelte b/src/routes/core/+page.svelte index d09288f0..43326465 100644 --- a/src/routes/core/+page.svelte +++ b/src/routes/core/+page.svelte @@ -23,7 +23,7 @@

System Infrastructure & Identity

-
+

Active Account

diff --git a/src/routes/core/users/[user_id]/+page.svelte b/src/routes/core/users/[user_id]/+page.svelte index 1c862a72..6beb4c15 100644 --- a/src/routes/core/users/[user_id]/+page.svelte +++ b/src/routes/core/users/[user_id]/+page.svelte @@ -14,7 +14,7 @@ Lock, Clock, Key, - CheckCircle2, + CircleCheck, CircleX, Fingerprint, Activity, diff --git a/src/routes/events/+layout.svelte b/src/routes/events/+layout.svelte index c804384b..e440e16b 100644 --- a/src/routes/events/+layout.svelte +++ b/src/routes/events/+layout.svelte @@ -5,7 +5,7 @@ // *** Import Svelte specific import { untrack } from 'svelte'; // import { browser } from '$app/environment'; - import { goto, invalidateAll } from '$app/navigation'; + import { goto } from '$app/navigation'; // *** Import other supporting libraries // import * as icons from '@lucide/svelte'; diff --git a/src/routes/events/+page.svelte b/src/routes/events/+page.svelte index 7136aeae..a63212ab 100644 --- a/src/routes/events/+page.svelte +++ b/src/routes/events/+page.svelte @@ -13,11 +13,11 @@ slct, slct_trigger } from '$lib/stores/ae_stores'; - import { - events_loc, - events_slct, - events_trigger - } from '$lib/stores/ae_events_stores'; + // import { + // events_loc, + // events_slct, + // events_trigger + // } from '$lib/stores/ae_events_stores'; import { ae_util } from '$lib/ae_utils/ae_utils'; import { page } from '$app/stores'; diff --git a/src/routes/events/[event_id]/(badges)/badges/+page.svelte b/src/routes/events/[event_id]/(badges)/badges/+page.svelte index 0d8ac43c..0657fa53 100644 --- a/src/routes/events/[event_id]/(badges)/badges/+page.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/+page.svelte @@ -28,9 +28,9 @@ import Comp_badge_search from './ae_comp__badge_search.svelte'; import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte'; - import { Modal } from 'flowbite-svelte'; - import Comp_badge_create_form from './ae_comp__badge_create_form.svelte'; - import Comp_badge_upload_form from './ae_comp__badge_upload_form.svelte'; + // import { Modal } from 'flowbite-svelte'; + // import Comp_badge_create_form from './ae_comp__badge_create_form.svelte'; + // import Comp_badge_upload_form from './ae_comp__badge_upload_form.svelte'; import { LoaderCircle } from 'lucide-svelte'; // *** Initialization & Store Guard *** diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte index bc09321b..85054263 100644 --- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte @@ -25,7 +25,7 @@ import { browser } from '$app/environment'; // *** Import other supporting libraries - import { liveQuery } from 'dexie'; + // import { liveQuery } from 'dexie'; import type { key_val } from '$lib/stores/ae_stores'; import { core_func } from '$lib/ae_core/ae_core_functions'; @@ -38,18 +38,18 @@ slct, slct_trigger } from '$lib/stores/ae_stores'; - import { db_events } from '$lib/ae_events/db_events'; - import { - events_loc, - events_sess, - events_slct, - events_trigger - } from '$lib/stores/ae_events_stores'; + // import { db_events } from '$lib/ae_events/db_events'; + // import { + // events_loc, + // events_sess, + // events_slct, + // events_trigger + // } from '$lib/stores/ae_events_stores'; import { events_func } from '$lib/ae_events_functions'; // *** Variables - let ae_promises: key_val = $state({}); - let ae_tmp: key_val = $state({}); + // let ae_promises: key_val = $state({}); + // let ae_tmp: key_val = $state({}); let ae_triggers: key_val = $state({}); // ISHLT 2024 badge type codes @@ -930,26 +930,6 @@ onkeypress={() => { {/if}
- - - - {#if $lq__event_badge_template_obj.show_qr_front} {#await event_badge_qr_id_get_promise} Generating... @@ -968,7 +948,6 @@ onkeypress={() => { hide_qr ? (hide_qr = false) : (hide_qr = true); }} /> - {/if} {/await} {/if} diff --git a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte index c85dac8e..24df9d0f 100644 --- a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte @@ -19,7 +19,7 @@ hide_badge_type = false }: Props = $props(); - import { type Badge as BadgeType } from '$lib/ae_events/db_events'; + // import { type Badge as BadgeType } from '$lib/ae_events/db_events'; import { ae_loc } from '$lib/stores/ae_stores'; import { ae_util } from '$lib/ae_utils/ae_utils'; import { diff --git a/src/routes/events/[event_id]/(leads)/leads/+layout.svelte b/src/routes/events/[event_id]/(leads)/leads/+layout.svelte index a7062e7b..b2612b31 100644 --- a/src/routes/events/[event_id]/(leads)/leads/+layout.svelte +++ b/src/routes/events/[event_id]/(leads)/leads/+layout.svelte @@ -7,6 +7,5 @@ // Basic layout for the leads module - - {@render children?.()} - + +{@render children?.()} diff --git a/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_comp__exhibit_signin.svelte b/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_comp__exhibit_signin.svelte index 17aaff9e..3d64a89c 100644 --- a/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_comp__exhibit_signin.svelte +++ b/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_comp__exhibit_signin.svelte @@ -8,7 +8,7 @@ import { db_events } from '$lib/ae_events/db_events'; import { ae_loc } from '$lib/stores/ae_stores'; import { events_loc, events_sess } from '$lib/stores/ae_events_stores'; - import { Key, Mail, Lock, User, ArrowRight, LoaderCircle, CircleAlert, CheckCircle2 } from 'lucide-svelte'; + import { Key, Mail, Lock, User, ArrowRight, LoaderCircle, CircleAlert, CircleCheck } from 'lucide-svelte'; import { untrack } from 'svelte'; const exhibit_id = $derived(page.params.exhibit_id ?? ''); @@ -191,7 +191,7 @@ Signing In... {:else if status === 'success'} - + Welcome! {:else} Get Started diff --git a/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_tab__start.svelte b/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_tab__start.svelte index fa5b06c6..d2bf87d0 100644 --- a/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_tab__start.svelte +++ b/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/ae_tab__start.svelte @@ -7,7 +7,7 @@ import { liveQuery } from 'dexie'; import { db_events } from '$lib/ae_events/db_events'; import Comp_exhibit_signin from './ae_comp__exhibit_signin.svelte'; - import { LayoutGrid, CheckCircle2, UserCheck, ShieldCheck } from 'lucide-svelte'; + import { LayoutGrid, CircleCheck, UserCheck, ShieldCheck } from 'lucide-svelte'; const exhibit_id = $derived(page.params.exhibit_id ?? ''); @@ -20,7 +20,7 @@
- +
@@ -38,7 +38,7 @@
- + Fast Capture
diff --git a/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/lead/[exhibit_tracking_id]/ae_comp__lead_detail_form.svelte b/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/lead/[exhibit_tracking_id]/ae_comp__lead_detail_form.svelte index cf2e2b78..b8ff14f2 100644 --- a/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/lead/[exhibit_tracking_id]/ae_comp__lead_detail_form.svelte +++ b/src/routes/events/[event_id]/(leads)/leads/exhibit/[exhibit_id]/lead/[exhibit_tracking_id]/ae_comp__lead_detail_form.svelte @@ -6,7 +6,7 @@ import { untrack } from 'svelte'; import { ae_api } from '$lib/stores/ae_stores'; import { events_func } from '$lib/ae_events_functions'; - import { Save, LoaderCircle, CheckCircle2 } from 'lucide-svelte'; + import { Save, LoaderCircle, CircleCheck } from 'lucide-svelte'; interface Props { exhibit_tracking_id: string; @@ -26,7 +26,7 @@ // Handle both string and pre-parsed array/object question_defs = typeof custom_questions_json === 'string' ? JSON.parse(custom_questions_json || '[]') : (custom_questions_json || []); const parsed_responses = typeof current_responses_json === 'string' ? JSON.parse(current_responses_json || '{}') : (current_responses_json || {}); - + untrack(() => { responses = parsed_responses; }); @@ -61,28 +61,28 @@