General code clean up. Removing old stuff.
This commit is contained in:
@@ -11,13 +11,13 @@
|
|||||||
import '../app.css';
|
import '../app.css';
|
||||||
|
|
||||||
// *** Import other supporting libraries
|
// *** Import other supporting libraries
|
||||||
import {
|
// import {
|
||||||
ArrowBigRight,
|
// ArrowBigRight,
|
||||||
CircleX,
|
// CircleX,
|
||||||
RefreshCw,
|
// RefreshCw,
|
||||||
RefreshCcw,
|
// RefreshCcw,
|
||||||
RefreshCcwDot
|
// RefreshCcwDot
|
||||||
} from '@lucide/svelte';
|
// } from '@lucide/svelte';
|
||||||
|
|
||||||
// Highlight JS
|
// Highlight JS
|
||||||
import hljs from 'highlight.js/lib/core';
|
import hljs from 'highlight.js/lib/core';
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
hljs.registerLanguage('typescript', typescript);
|
hljs.registerLanguage('typescript', typescript);
|
||||||
|
|
||||||
// *** Import Aether specific variables and functions
|
// *** 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 { 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_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';
|
import E_app_sys_menu from '$lib/app_components/e_app_sys_menu.svelte';
|
||||||
|
|
||||||
@@ -50,18 +50,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let { data, children }: Props = $props();
|
let { data, children }: Props = $props();
|
||||||
|
|
||||||
// STABLE DERIVATION: Using prop data directly to avoid store loops
|
// STABLE DERIVATION: Using prop data directly to avoid store loops
|
||||||
let ae_acct = $derived(data[data.account_id]);
|
let ae_acct = $derived(data[data.account_id]);
|
||||||
|
|
||||||
let flag_clear_idb: boolean = $state(false);
|
let flag_clear_idb: boolean = $state(false);
|
||||||
let flag_clear_local: boolean = $state(false);
|
let flag_clear_local: boolean = $state(false);
|
||||||
let flag_clear_sess: 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_new_ver: boolean = $state(false);
|
||||||
let flag_expired: boolean = $state(false);
|
let flag_expired: boolean = $state(false);
|
||||||
let flag_denied: boolean = $state(false);
|
let flag_denied: boolean = $state(false);
|
||||||
|
|
||||||
// Connection Status
|
// Connection Status
|
||||||
let is_offline = $derived(browser && online.current === false);
|
let is_offline = $derived(browser && online.current === false);
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
// Restore structural integrity if clobbered
|
// 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.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 (!new_loc.debug_menu) new_loc.debug_menu = { hide: false, expand: false };
|
||||||
|
|
||||||
if (JSON.stringify(current_loc) !== JSON.stringify(new_loc)) {
|
if (JSON.stringify(current_loc) !== JSON.stringify(new_loc)) {
|
||||||
$ae_loc = new_loc;
|
$ae_loc = new_loc;
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
|
|
||||||
if (flag_clear_local) clear_local();
|
if (flag_clear_local) clear_local();
|
||||||
if (flag_clear_sess) clear_sess();
|
if (flag_clear_sess) clear_sess();
|
||||||
|
|
||||||
console.log("ROOT: Executing throttled reload");
|
console.log("ROOT: Executing throttled reload");
|
||||||
invalidateAll();
|
invalidateAll();
|
||||||
});
|
});
|
||||||
@@ -160,10 +160,10 @@
|
|||||||
let is_hydrating = $state(true);
|
let is_hydrating = $state(true);
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (!browser) return;
|
if (!browser) return;
|
||||||
|
|
||||||
// Theme DOM update
|
// Theme DOM update
|
||||||
document.documentElement.setAttribute('data-theme', $ae_loc?.theme_name ?? 'nouveau');
|
document.documentElement.setAttribute('data-theme', $ae_loc?.theme_name ?? 'nouveau');
|
||||||
|
|
||||||
// Hydration overlay timer
|
// Hydration overlay timer
|
||||||
if ($ae_loc?.account_id) {
|
if ($ae_loc?.account_id) {
|
||||||
const timer = setTimeout(() => is_hydrating = false, 500);
|
const timer = setTimeout(() => is_hydrating = false, 500);
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{#if browser && (is_offline || api_unreachable)}
|
{#if browser && (is_offline || api_unreachable)}
|
||||||
<div class="fixed top-0 left-0 right-0 z-[100] p-4 bg-orange-600/90 text-white text-center shadow-2xl flex items-center justify-center gap-4">
|
<div class="fixed top-0 left-0 right-0 z-100 p-4 bg-orange-600/90 text-white text-center shadow-2xl flex items-center justify-center gap-4">
|
||||||
<span class="text-xl font-bold">{is_offline ? 'Offline' : api_error_msg}</span>
|
<span class="text-xl font-bold">{is_offline ? 'Offline' : api_error_msg}</span>
|
||||||
<button class="btn btn-sm variant-filled-white text-orange-600" onclick={() => window.location.reload()}>Retry</button>
|
<button class="btn btn-sm variant-filled-white text-orange-600" onclick={() => window.location.reload()}>Retry</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -237,9 +237,9 @@
|
|||||||
|
|
||||||
{#if browser && $ae_loc?.allow_access}
|
{#if browser && $ae_loc?.allow_access}
|
||||||
{@render children?.()}
|
{@render children?.()}
|
||||||
|
|
||||||
{#if is_hydrating}
|
{#if is_hydrating}
|
||||||
<div class="fixed inset-0 z-[99] flex flex-col items-center justify-center bg-surface-50/80 dark:bg-surface-900/80 backdrop-blur-sm transition-opacity duration-500">
|
<div class="fixed inset-0 z-99 flex flex-col items-center justify-center bg-surface-50/80 dark:bg-surface-900/80 backdrop-blur-sm transition-opacity duration-500">
|
||||||
<div class="preset-filled-surface-100-900 p-8 rounded-2xl shadow-2xl flex flex-col items-center gap-4">
|
<div class="preset-filled-surface-100-900 p-8 rounded-2xl shadow-2xl flex flex-col items-center gap-4">
|
||||||
<span class="fas fa-cog fa-spin text-5xl text-primary-500"></span>
|
<span class="fas fa-cog fa-spin text-5xl text-primary-500"></span>
|
||||||
<div class="text-center font-bold text-xl">Hydrating Aether...</div>
|
<div class="text-center font-bold text-xl">Hydrating Aether...</div>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/** @type {import('./$types').LayoutLoad} */
|
/** @type {import('./$types').LayoutLoad} */
|
||||||
// console.log(`ae_root +layout.ts: start`);
|
// 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 { lookup_site_domain_v3 } from '$lib/ae_core/ae_core__site';
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
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 ssr = false;
|
||||||
export const prerender = false;
|
export const prerender = false;
|
||||||
@@ -17,8 +17,8 @@ import {
|
|||||||
PUBLIC_AE_API_PATH,
|
PUBLIC_AE_API_PATH,
|
||||||
PUBLIC_AE_API_SECRET_KEY,
|
PUBLIC_AE_API_SECRET_KEY,
|
||||||
PUBLIC_AE_API_CRUD_SUPER_KEY,
|
PUBLIC_AE_API_CRUD_SUPER_KEY,
|
||||||
PUBLIC_AE_NO_ACCOUNT_ID,
|
// PUBLIC_AE_NO_ACCOUNT_ID,
|
||||||
PUBLIC_AE_NO_ACCOUNT_ID_TOKEN
|
// PUBLIC_AE_NO_ACCOUNT_ID_TOKEN
|
||||||
} from '$env/static/public';
|
} from '$env/static/public';
|
||||||
|
|
||||||
const api_base_url = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_SERVER}:${PUBLIC_AE_API_PORT}${PUBLIC_AE_API_PATH}`;
|
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 api_crud_super_key = PUBLIC_AE_API_CRUD_SUPER_KEY;
|
||||||
|
|
||||||
const ae_account_id: null | string = null;
|
const ae_account_id: null | string = null;
|
||||||
const ae_no_account_id = PUBLIC_AE_NO_ACCOUNT_ID;
|
// 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_token = PUBLIC_AE_NO_ACCOUNT_ID_TOKEN;
|
||||||
|
|
||||||
const ae_api_init: key_val = {
|
const ae_api_init: key_val = {
|
||||||
ver: '2024-08-11_11',
|
ver: '2024-08-11_11',
|
||||||
@@ -56,10 +56,10 @@ export async function load({ fetch, params, parent, route, url }) {
|
|||||||
let account_id: any;
|
let account_id: any;
|
||||||
|
|
||||||
const ae_acct: key_val = {
|
const ae_acct: key_val = {
|
||||||
api: {
|
api: {
|
||||||
...ae_api_init,
|
...ae_api_init,
|
||||||
headers: { ...ae_api_headers } // Local clone
|
headers: { ...ae_api_headers } // Local clone
|
||||||
},
|
},
|
||||||
ds: {},
|
ds: {},
|
||||||
loc: {
|
loc: {
|
||||||
account_id: '',
|
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_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,
|
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
|
// Inject native device metadata into the location state with SAFE MERGE
|
||||||
if (native_device_config.native_device) {
|
if (native_device_config.native_device) {
|
||||||
const incoming_dev = 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_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.event_id_random) incoming_dev.event_id = incoming_dev.event_id_random;
|
||||||
if (incoming_dev.id_random) incoming_dev.id = incoming_dev.id_random;
|
if (incoming_dev.id_random) incoming_dev.id = incoming_dev.id_random;
|
||||||
|
|
||||||
// 1. Recover existing user overrides from localStorage
|
// 1. Recover existing user overrides from localStorage
|
||||||
let existing_dev = {};
|
let existing_dev = {};
|
||||||
try {
|
try {
|
||||||
@@ -205,13 +205,13 @@ export async function load({ fetch, params, parent, route, url }) {
|
|||||||
if (!result) {
|
if (!result) {
|
||||||
try {
|
try {
|
||||||
if (log_lvl) console.log(`ROOT LOAD: No cache. Starting site lookup V3 for ${fqdn}...`);
|
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
|
// 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,
|
...ae_api_init,
|
||||||
api_secret_key: 'IDF68Em5X4HTZlswRNgepQ',
|
api_secret_key: 'IDF68Em5X4HTZlswRNgepQ',
|
||||||
headers: {
|
headers: {
|
||||||
...ae_api_init.headers,
|
...ae_api_init.headers,
|
||||||
'x-aether-api-key': 'IDF68Em5X4HTZlswRNgepQ',
|
'x-aether-api-key': 'IDF68Em5X4HTZlswRNgepQ',
|
||||||
'x-no-account-id': 'bypass' // Force explicit bypass for bootstrap
|
'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;
|
const json_data = result;
|
||||||
// ... rest of the mapping logic ...
|
// ... 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;
|
data_struct.account_id = account_id;
|
||||||
ae_acct.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_code'] = json_data.account_code || 'ghost';
|
||||||
ae_loc_init['account_name'] = json_data.account_name || 'Ghost Account';
|
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_id'] = json_data.site_id || 'ghost';
|
||||||
ae_loc_init['site_domain_id'] = json_data.site_domain_id || json_data.site_domain_id_random || '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_enable'] = json_data.enable || '1';
|
||||||
ae_loc_init['site_header_image_path'] = json_data.header_image_path || '';
|
ae_loc_init['site_header_image_path'] = json_data.header_image_path || '';
|
||||||
ae_loc_init['site_style_href'] = json_data.style_href || '';
|
ae_loc_init['site_style_href'] = json_data.style_href || '';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<p class="text-xs font-bold opacity-50 uppercase tracking-widest">System Infrastructure & Identity</p>
|
<p class="text-xs font-bold opacity-50 uppercase tracking-widest">System Infrastructure & Identity</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-black/5 p-3 rounded-xl border border-surface-500/10 min-w-[200px]">
|
<div class="bg-black/5 p-3 rounded-xl border border-surface-500/10 min-w-50">
|
||||||
<p class="text-[10px] opacity-60 uppercase font-black tracking-widest flex items-center gap-1 mb-1">
|
<p class="text-[10px] opacity-60 uppercase font-black tracking-widest flex items-center gap-1 mb-1">
|
||||||
<Landmark size={10} /> Active Account
|
<Landmark size={10} /> Active Account
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
Lock,
|
Lock,
|
||||||
Clock,
|
Clock,
|
||||||
Key,
|
Key,
|
||||||
CheckCircle2,
|
CircleCheck,
|
||||||
CircleX,
|
CircleX,
|
||||||
Fingerprint,
|
Fingerprint,
|
||||||
Activity,
|
Activity,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// *** Import Svelte specific
|
// *** Import Svelte specific
|
||||||
import { untrack } from 'svelte';
|
import { untrack } from 'svelte';
|
||||||
// import { browser } from '$app/environment';
|
// import { browser } from '$app/environment';
|
||||||
import { goto, invalidateAll } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
|
||||||
// *** Import other supporting libraries
|
// *** Import other supporting libraries
|
||||||
// import * as icons from '@lucide/svelte';
|
// import * as icons from '@lucide/svelte';
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
slct,
|
slct,
|
||||||
slct_trigger
|
slct_trigger
|
||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import {
|
// import {
|
||||||
events_loc,
|
// events_loc,
|
||||||
events_slct,
|
// events_slct,
|
||||||
events_trigger
|
// events_trigger
|
||||||
} from '$lib/stores/ae_events_stores';
|
// } from '$lib/stores/ae_events_stores';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
|
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
|||||||
@@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
import Comp_badge_search from './ae_comp__badge_search.svelte';
|
import Comp_badge_search from './ae_comp__badge_search.svelte';
|
||||||
import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte';
|
import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte';
|
||||||
import { Modal } from 'flowbite-svelte';
|
// import { Modal } from 'flowbite-svelte';
|
||||||
import Comp_badge_create_form from './ae_comp__badge_create_form.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 Comp_badge_upload_form from './ae_comp__badge_upload_form.svelte';
|
||||||
import { LoaderCircle } from 'lucide-svelte';
|
import { LoaderCircle } from 'lucide-svelte';
|
||||||
|
|
||||||
// *** Initialization & Store Guard ***
|
// *** Initialization & Store Guard ***
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
|
|
||||||
// *** Import other supporting libraries
|
// *** Import other supporting libraries
|
||||||
import { liveQuery } from 'dexie';
|
// import { liveQuery } from 'dexie';
|
||||||
|
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||||
@@ -38,18 +38,18 @@
|
|||||||
slct,
|
slct,
|
||||||
slct_trigger
|
slct_trigger
|
||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import { db_events } from '$lib/ae_events/db_events';
|
// import { db_events } from '$lib/ae_events/db_events';
|
||||||
import {
|
// import {
|
||||||
events_loc,
|
// events_loc,
|
||||||
events_sess,
|
// events_sess,
|
||||||
events_slct,
|
// events_slct,
|
||||||
events_trigger
|
// events_trigger
|
||||||
} from '$lib/stores/ae_events_stores';
|
// } from '$lib/stores/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
// *** Variables
|
// *** Variables
|
||||||
let ae_promises: key_val = $state({});
|
// let ae_promises: key_val = $state({});
|
||||||
let ae_tmp: key_val = $state({});
|
// let ae_tmp: key_val = $state({});
|
||||||
let ae_triggers: key_val = $state({});
|
let ae_triggers: key_val = $state({});
|
||||||
|
|
||||||
// ISHLT 2024 badge type codes
|
// ISHLT 2024 badge type codes
|
||||||
@@ -930,26 +930,6 @@ onkeypress={() => {
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- {#if lq__event_badge_template_obj.show_qr_front}
|
|
||||||
<div class="container qr_code">
|
|
||||||
{#await initial_loading_promise}
|
|
||||||
Generating...
|
|
||||||
{:then result}
|
|
||||||
{#if initial_loading_promise}
|
|
||||||
<img class="mecard_qr qr_code" style="" src="/event/qr_image/event_badge_obj_{$lq__event_badge_obj.event_badge_id}?qr_filename=attendee_qr.png" alt="missing QR code">
|
|
||||||
{/if}
|
|
||||||
{/await}
|
|
||||||
</div>
|
|
||||||
{/if} -->
|
|
||||||
|
|
||||||
<!-- {#await initial_loading_promise}
|
|
||||||
Generating...
|
|
||||||
{:then result}
|
|
||||||
{#if initial_loading_promise}
|
|
||||||
<img class="qr_code mecard_qr" style="" src="/event/qr_image/event_badge_mecard_{$lq__event_badge_obj.event_badge_id}?qr_filename=attendee_qr.png" alt="missing QR code">
|
|
||||||
{/if}
|
|
||||||
{/await} -->
|
|
||||||
|
|
||||||
{#if $lq__event_badge_template_obj.show_qr_front}
|
{#if $lq__event_badge_template_obj.show_qr_front}
|
||||||
{#await event_badge_qr_id_get_promise}
|
{#await event_badge_qr_id_get_promise}
|
||||||
Generating...
|
Generating...
|
||||||
@@ -968,7 +948,6 @@ onkeypress={() => {
|
|||||||
hide_qr ? (hide_qr = false) : (hide_qr = true);
|
hide_qr ? (hide_qr = false) : (hide_qr = true);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<!-- src="{$cfg.api['base_url']}/qr/{$ae_loc.account_id}/{$lq__event_badge_obj.event_badge_id}?filename=qr_{$ae_loc.account_id}_{$lq__event_badge_obj.event_badge_id}_mecard.png" -->
|
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
hide_badge_type = false
|
hide_badge_type = false
|
||||||
}: Props = $props();
|
}: 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_loc } from '$lib/stores/ae_stores';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -7,6 +7,5 @@
|
|||||||
// Basic layout for the leads module
|
// Basic layout for the leads module
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- <div class="leads-module"> -->
|
|
||||||
{@render children?.()}
|
{@render children?.()}
|
||||||
<!-- </div> -->
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import { db_events } from '$lib/ae_events/db_events';
|
import { db_events } from '$lib/ae_events/db_events';
|
||||||
import { ae_loc } from '$lib/stores/ae_stores';
|
import { ae_loc } from '$lib/stores/ae_stores';
|
||||||
import { events_loc, events_sess } from '$lib/stores/ae_events_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';
|
import { untrack } from 'svelte';
|
||||||
|
|
||||||
const exhibit_id = $derived(page.params.exhibit_id ?? '');
|
const exhibit_id = $derived(page.params.exhibit_id ?? '');
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
<LoaderCircle size="1.5em" class="animate-spin mr-2" />
|
<LoaderCircle size="1.5em" class="animate-spin mr-2" />
|
||||||
Signing In...
|
Signing In...
|
||||||
{:else if status === 'success'}
|
{:else if status === 'success'}
|
||||||
<CheckCircle2 size="1.5em" class="mr-2" />
|
<CircleCheck size="1.5em" class="mr-2" />
|
||||||
Welcome!
|
Welcome!
|
||||||
{:else}
|
{:else}
|
||||||
Get Started <ArrowRight size="1.2em" class="ml-2 group-hover:translate-x-1 transition-transform" />
|
Get Started <ArrowRight size="1.2em" class="ml-2 group-hover:translate-x-1 transition-transform" />
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
import { liveQuery } from 'dexie';
|
import { liveQuery } from 'dexie';
|
||||||
import { db_events } from '$lib/ae_events/db_events';
|
import { db_events } from '$lib/ae_events/db_events';
|
||||||
import Comp_exhibit_signin from './ae_comp__exhibit_signin.svelte';
|
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 ?? '');
|
const exhibit_id = $derived(page.params.exhibit_id ?? '');
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="ae-tab-start w-full space-y-8 animate-in fade-in slide-in-from-bottom-2 duration-300">
|
<div class="ae-tab-start w-full space-y-8 animate-in fade-in slide-in-from-bottom-2 duration-300">
|
||||||
|
|
||||||
<!-- Hero / Welcome Section -->
|
<!-- Hero / Welcome Section -->
|
||||||
<section class="text-center space-y-4 py-6">
|
<section class="text-center space-y-4 py-6">
|
||||||
<div class="inline-flex p-4 rounded-full bg-primary-500/10 text-primary-500 mb-2">
|
<div class="inline-flex p-4 rounded-full bg-primary-500/10 text-primary-500 mb-2">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<!-- Features Grid (Compact) -->
|
<!-- Features Grid (Compact) -->
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 max-w-2xl mx-auto px-4">
|
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 max-w-2xl mx-auto px-4">
|
||||||
<div class="flex flex-col items-center text-center p-4 rounded-xl variant-soft-surface">
|
<div class="flex flex-col items-center text-center p-4 rounded-xl variant-soft-surface">
|
||||||
<CheckCircle2 size="1.5em" class="text-success-500 mb-2" />
|
<CircleCheck size="1.5em" class="text-success-500 mb-2" />
|
||||||
<span class="text-xs font-bold uppercase tracking-wider">Fast Capture</span>
|
<span class="text-xs font-bold uppercase tracking-wider">Fast Capture</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col items-center text-center p-4 rounded-xl variant-soft-surface">
|
<div class="flex flex-col items-center text-center p-4 rounded-xl variant-soft-surface">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { untrack } from 'svelte';
|
import { untrack } from 'svelte';
|
||||||
import { ae_api } from '$lib/stores/ae_stores';
|
import { ae_api } from '$lib/stores/ae_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
import { Save, LoaderCircle, CheckCircle2 } from 'lucide-svelte';
|
import { Save, LoaderCircle, CircleCheck } from 'lucide-svelte';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
exhibit_tracking_id: string;
|
exhibit_tracking_id: string;
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
// Handle both string and pre-parsed array/object
|
// Handle both string and pre-parsed array/object
|
||||||
question_defs = typeof custom_questions_json === 'string' ? JSON.parse(custom_questions_json || '[]') : (custom_questions_json || []);
|
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 || {});
|
const parsed_responses = typeof current_responses_json === 'string' ? JSON.parse(current_responses_json || '{}') : (current_responses_json || {});
|
||||||
|
|
||||||
untrack(() => {
|
untrack(() => {
|
||||||
responses = parsed_responses;
|
responses = parsed_responses;
|
||||||
});
|
});
|
||||||
@@ -61,28 +61,28 @@
|
|||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
<label class="label">
|
<label class="label">
|
||||||
<span class="text-[10px] uppercase font-black opacity-40 tracking-widest ml-1">{q.label}</span>
|
<span class="text-[10px] uppercase font-black opacity-40 tracking-widest ml-1">{q.label}</span>
|
||||||
|
|
||||||
{#if q.type === 'textarea'}
|
{#if q.type === 'textarea'}
|
||||||
<textarea
|
<textarea
|
||||||
bind:value={responses[q.label]}
|
bind:value={responses[q.label]}
|
||||||
class="textarea variant-filled-surface rounded-lg p-3 text-sm"
|
class="textarea variant-filled-surface rounded-lg p-3 text-sm"
|
||||||
rows="3"
|
rows="3"
|
||||||
placeholder="Type response..."
|
placeholder="Type response..."
|
||||||
></textarea>
|
></textarea>
|
||||||
|
|
||||||
{:else if q.type === 'toggle'}
|
{:else if q.type === 'toggle'}
|
||||||
<div class="flex items-center gap-4 p-3 variant-soft rounded-lg">
|
<div class="flex items-center gap-4 p-3 variant-soft rounded-lg">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={responses[q.label]}
|
bind:checked={responses[q.label]}
|
||||||
class="checkbox"
|
class="checkbox"
|
||||||
/>
|
/>
|
||||||
<span class="text-sm font-bold">{responses[q.label] ? 'Yes' : 'No'}</span>
|
<span class="text-sm font-bold">{responses[q.label] ? 'Yes' : 'No'}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{:else if q.type === 'select'}
|
{:else if q.type === 'select'}
|
||||||
<select
|
<select
|
||||||
bind:value={responses[q.label]}
|
bind:value={responses[q.label]}
|
||||||
class="select variant-filled-surface rounded-lg p-3 text-sm"
|
class="select variant-filled-surface rounded-lg p-3 text-sm"
|
||||||
>
|
>
|
||||||
<option value="">-- Select Option --</option>
|
<option value="">-- Select Option --</option>
|
||||||
@@ -92,9 +92,9 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
{:else}
|
{:else}
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
bind:value={responses[q.label]}
|
bind:value={responses[q.label]}
|
||||||
class="input variant-filled-surface rounded-lg p-3 text-sm"
|
class="input variant-filled-surface rounded-lg p-3 text-sm"
|
||||||
placeholder="Type response..."
|
placeholder="Type response..."
|
||||||
/>
|
/>
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
<p class="text-center opacity-30 italic py-4">No custom questions configured for this exhibit.</p>
|
<p class="text-center opacity-30 italic py-4">No custom questions configured for this exhibit.</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn variant-filled-primary w-full font-bold shadow-lg"
|
class="btn variant-filled-primary w-full font-bold shadow-lg"
|
||||||
disabled={status === 'saving'}
|
disabled={status === 'saving'}
|
||||||
onclick={handle_save}
|
onclick={handle_save}
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
{#if status === 'saving'}
|
{#if status === 'saving'}
|
||||||
<LoaderCircle size="1.2em" class="animate-spin mr-2" /> Saving...
|
<LoaderCircle size="1.2em" class="animate-spin mr-2" /> Saving...
|
||||||
{:else if status === 'success'}
|
{:else if status === 'success'}
|
||||||
<CheckCircle2 size="1.2em" class="mr-2" /> Saved!
|
<CircleCheck size="1.2em" class="mr-2" /> Saved!
|
||||||
{:else}
|
{:else}
|
||||||
<Save size="1.2em" class="mr-2" /> Save Responses
|
<Save size="1.2em" class="mr-2" /> Save Responses
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { error } from '@sveltejs/kit';
|
|||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
export async function load({ params, parent, url }) {
|
export async function load({ params, parent }) {
|
||||||
// route
|
// route
|
||||||
const log_lvl: number = 0;
|
const log_lvl: number = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -31,13 +31,13 @@
|
|||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
// Imports
|
// Imports
|
||||||
import { liveQuery } from 'dexie';
|
// import { liveQuery } from 'dexie';
|
||||||
|
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
import { api } from '$lib/api/api';
|
// import { api } from '$lib/api/api';
|
||||||
|
|
||||||
import { db_events } from '$lib/ae_events/db_events';
|
// import { db_events } from '$lib/ae_events/db_events';
|
||||||
import {
|
import {
|
||||||
ae_snip,
|
ae_snip,
|
||||||
ae_loc,
|
ae_loc,
|
||||||
@@ -461,16 +461,6 @@
|
|||||||
></span>
|
></span>
|
||||||
<span class="hidden"> Download </span>
|
<span class="hidden"> Download </span>
|
||||||
</a>
|
</a>
|
||||||
<!-- <button type="button"
|
|
||||||
use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${ae_util.clean_filename(event_file_obj?.filename)}&key=${$ae_api.account_id}`)}
|
|
||||||
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs"
|
|
||||||
title="Copy the direct download file link: {ae_util.clean_filename(event_file_obj?.filename ?? 'unknown')}"
|
|
||||||
>
|
|
||||||
<span class="fas fa-copy mx-1"></span>
|
|
||||||
<span class="hidden">
|
|
||||||
Copy Link
|
|
||||||
</span>
|
|
||||||
</button> -->
|
|
||||||
|
|
||||||
<MyClipboard
|
<MyClipboard
|
||||||
value={encodeURI(
|
value={encodeURI(
|
||||||
@@ -510,16 +500,7 @@
|
|||||||
></span>
|
></span>
|
||||||
<span class="hidden"> Renamed </span>
|
<span class="hidden"> Renamed </span>
|
||||||
</a>
|
</a>
|
||||||
<!-- <button type="button"
|
|
||||||
use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&key=${$ae_api.account_id}`)}
|
|
||||||
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs"
|
|
||||||
title="Copy the renamed file link"
|
|
||||||
>
|
|
||||||
<span class="fas fa-copy mx-1"></span>
|
|
||||||
<span class="hidden">
|
|
||||||
Copy Renamed
|
|
||||||
</span>
|
|
||||||
</button> -->
|
|
||||||
<MyClipboard
|
<MyClipboard
|
||||||
value={encodeURI(
|
value={encodeURI(
|
||||||
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&key=${$ae_api.account_id}`
|
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&key=${$ae_api.account_id}`
|
||||||
@@ -555,16 +536,7 @@
|
|||||||
></span>
|
></span>
|
||||||
<span class="hidden"> Renamed </span>
|
<span class="hidden"> Renamed </span>
|
||||||
</a>
|
</a>
|
||||||
<!-- <button type="button"
|
|
||||||
use:clipboard={encodeURI(`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&key=${$ae_api.account_id}`)}
|
|
||||||
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs"
|
|
||||||
title="Copy the renamed file link"
|
|
||||||
>
|
|
||||||
<span class="fas fa-copy mx-1"></span>
|
|
||||||
<span class="hidden">
|
|
||||||
Copy Renamed
|
|
||||||
</span>
|
|
||||||
</button> -->
|
|
||||||
<MyClipboard
|
<MyClipboard
|
||||||
value={encodeURI(
|
value={encodeURI(
|
||||||
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&key=${$ae_api.account_id}`
|
`${$ae_api.base_url}/event/file/${event_file_obj?.event_file_id}/download?filename=${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}&key=${$ae_api.account_id}`
|
||||||
@@ -693,16 +665,7 @@
|
|||||||
{@html ae_snip.html__not_set}
|
{@html ae_snip.html__not_set}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<!-- <td class="px-4 py-2">
|
|
||||||
<span class="fas fa-envelope"></span>
|
|
||||||
<a
|
|
||||||
href="mailto:{event_file_obj?.email}"
|
|
||||||
class="text-blue-500 underline hover:text-blue-800"
|
|
||||||
>
|
|
||||||
{event_file_obj?.email}
|
|
||||||
</a>
|
|
||||||
</td> -->
|
|
||||||
<!-- <td class="px-4 py-2">{event_file_obj?.agree ? 'Yes' : 'No'}</td> -->
|
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* src/routes/events/ae_comp__event_files_upload.svelte
|
* src/routes/events/ae_comp__event_files_upload.svelte
|
||||||
* Specialized component for uploading files and automatically linking them to Event objects.
|
* Specialized component for uploading files and automatically linking them to Event objects.
|
||||||
*/
|
*/
|
||||||
import * as Lucide from 'lucide-svelte';
|
import { LoaderCircle } from 'lucide-svelte';
|
||||||
import Element_input_files_tbl from '$lib/elements/element_input_files_tbl.svelte';
|
import Element_input_files_tbl from '$lib/elements/element_input_files_tbl.svelte';
|
||||||
|
|
||||||
// Import storage, functions, and libraries
|
// Import storage, functions, and libraries
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
$events_sess.files.status__file_list != 'ready'}
|
$events_sess.files.status__file_list != 'ready'}
|
||||||
>
|
>
|
||||||
{#await ae_promises.upload__hosted_file_obj}
|
{#await ae_promises.upload__hosted_file_obj}
|
||||||
<Lucide.LoaderCircle class="animate-spin m-1" />
|
<LoaderCircle class="animate-spin m-1" />
|
||||||
<span class="">
|
<span class="">
|
||||||
{#if $ae_sess.api_upload_kv[task_id]}
|
{#if $ae_sess.api_upload_kv[task_id]}
|
||||||
{$ae_sess.api_upload_kv[task_id].percent_completed}%
|
{$ae_sess.api_upload_kv[task_id].percent_completed}%
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
{:then}
|
{:then}
|
||||||
<Lucide.UploadCloud class="m-1" size={20} />
|
<UploadCloud class="m-1" size={20} />
|
||||||
<span class="text-sm"> Upload </span>
|
<span class="text-sm"> Upload </span>
|
||||||
<span class="grow font-bold ml-2">
|
<span class="grow font-bold ml-2">
|
||||||
{#if $events_sess.files.processed_file_list?.length > 0}
|
{#if $events_sess.files.processed_file_list?.length > 0}
|
||||||
|
|||||||
Reference in New Issue
Block a user