Working on update a lot of pages using the ae_loc hub section.
This commit is contained in:
@@ -84,7 +84,7 @@ async function handle_load_ae_obj_id__site_domain(
|
||||
|
||||
let params = {};
|
||||
|
||||
// ae_loc.hub.site_domain_id_qry_status = 'loading';
|
||||
// ae_sess.hub.site_domain_id_qry_status = 'loading';
|
||||
ae_promises.load__site_domain_obj = api.get_ae_obj_id_crud({
|
||||
api_cfg: api_cfg,
|
||||
no_account_id: no_account_id,
|
||||
|
||||
@@ -57,6 +57,8 @@ export let ae_app_local_data_struct: key_val = {
|
||||
ver_idb: '2024-10-16_1540', // Clear if date IndexedDB version
|
||||
name: 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)',
|
||||
theme: 'light',
|
||||
theme_mode: 'light',
|
||||
theme_name: 'wintry', // wintry
|
||||
iframe: false,
|
||||
title: `OSIT's Æ`, // - Dev SvelteKit`, // Æ
|
||||
|
||||
@@ -112,6 +114,18 @@ export let ae_app_local_data_struct: key_val = {
|
||||
show_element__sql_qry_results: false,
|
||||
},
|
||||
|
||||
app_cfg: {
|
||||
show_element__access_type: true,
|
||||
show_element__cfg: true,
|
||||
show_element__cfg_detail: false,
|
||||
show_opt__debug: true,
|
||||
show_opt__permissions: true,
|
||||
show_opt__reset: true,
|
||||
show_opt__sync: true,
|
||||
show_opt__theme: true,
|
||||
show_opt__utilities: true,
|
||||
},
|
||||
|
||||
files: {
|
||||
processed_file_kv: {},
|
||||
uploaded_file_kv: {},
|
||||
@@ -233,6 +247,14 @@ export let ae_app_session_data_struct: key_val = {
|
||||
|
||||
'hub': {
|
||||
'show_xyz': null,
|
||||
'account_id_qry_status': null,
|
||||
'event_badge_id_status_qry__search': null,
|
||||
'event_presenter_id_qry_status': null,
|
||||
'site_domain_id_qry_status': null,
|
||||
'sponsorship_id_qry_status': null,
|
||||
'sponsorship_cfg_id_qry_status': null,
|
||||
|
||||
'qr': {},
|
||||
},
|
||||
'mod': {
|
||||
'archives': {},
|
||||
|
||||
@@ -122,14 +122,14 @@ function handle_check_access_type_passcode() {
|
||||
|
||||
// WARNING 2024-08-21: For some reason the config element does not auto show or hide when the access type changes.
|
||||
if (!$ae_loc.iframe && $ae_loc.authenticated_access) {
|
||||
$ae_loc.hub.show_element__access_type = true;
|
||||
$ae_loc.hub.show_element__cfg = true;
|
||||
$ae_loc.app_cfg.show_element__access_type = true;
|
||||
$ae_loc.app_cfg.show_element__cfg = true;
|
||||
} else if ($ae_loc.iframe && $ae_loc.trusted_access) {
|
||||
$ae_loc.hub.show_element__access_type = true;
|
||||
$ae_loc.hub.show_element__cfg = true;
|
||||
$ae_loc.app_cfg.show_element__access_type = true;
|
||||
$ae_loc.app_cfg.show_element__cfg = true;
|
||||
} else {
|
||||
$ae_loc.hub.show_element__access_type = true;
|
||||
$ae_loc.hub.show_element__cfg = false;
|
||||
$ae_loc.app_cfg.show_element__access_type = true;
|
||||
$ae_loc.app_cfg.show_element__cfg = false;
|
||||
}
|
||||
|
||||
// dispatch_access_type_changed();
|
||||
|
||||
@@ -26,23 +26,23 @@ onMount(() => {
|
||||
}
|
||||
});
|
||||
|
||||
// $: if ($slct_trigger == 'set_theme_mode' && $ae_loc?.hub?.theme_mode) {
|
||||
// console.log(`$ae_loc.hub.theme_mode=${$ae_loc?.hub?.theme_mode}`);
|
||||
// $: if ($slct_trigger == 'set_theme_mode' && $ae_loc?.app_cfg?.theme_mode) {
|
||||
// console.log(`$ae_loc.app_cfg.theme_mode=${$ae_loc?.app_cfg?.theme_mode}`);
|
||||
// $slct_trigger = null;
|
||||
// if ($ae_loc.hub.theme_mode == 'light') {
|
||||
// if ($ae_loc.app_cfg.theme_mode == 'light') {
|
||||
// document.documentElement.classList.remove('dark');
|
||||
// document.documentElement.classList.add('light');
|
||||
// } else if ($ae_loc.hub.theme_mode == 'dark') {
|
||||
// } else if ($ae_loc.app_cfg.theme_mode == 'dark') {
|
||||
// document.documentElement.classList.remove('light');
|
||||
// document.documentElement.classList.add('dark');
|
||||
// }
|
||||
// }
|
||||
|
||||
// $: if ($slct_trigger == 'set_theme_name' && $ae_loc?.hub?.theme_name) {
|
||||
// console.log(`$ae_loc?.hub?.theme_name=${$ae_loc?.hub?.theme_name}`);
|
||||
// $: if ($slct_trigger == 'set_theme_name' && $ae_loc?.app_cfg?.theme_name) {
|
||||
// console.log(`$ae_loc?.app_cfg?.theme_name=${$ae_loc?.app_cfg?.theme_name}`);
|
||||
// $slct_trigger = null;
|
||||
// // Update the body attribute named "data-theme" to the current theme name.
|
||||
// document.body.setAttribute('data-theme', $ae_loc?.hub?.theme_name);
|
||||
// document.body.setAttribute('data-theme', $ae_loc?.app_cfg?.theme_name);
|
||||
// }
|
||||
|
||||
// $: if (entered_passcode && entered_passcode.length >= 5) {
|
||||
@@ -95,7 +95,7 @@ function handle_clear_storage(item: null|string) {
|
||||
|
||||
<div
|
||||
class="ae_cfg_content text-xs space-y-4 my-4"
|
||||
class:hidden={!$ae_loc.hub.show_element__cfg_detail}
|
||||
class:hidden={!$ae_loc.app_cfg.show_element__cfg_detail}
|
||||
data-sveltekit-preload-data="false"
|
||||
>
|
||||
|
||||
@@ -149,7 +149,7 @@ function handle_clear_storage(item: null|string) {
|
||||
on:change={() => {
|
||||
$slct_trigger = 'set_theme_mode';
|
||||
}}
|
||||
bind:group={$ae_loc.hub.theme_mode}
|
||||
bind:group={$ae_loc.app_cfg.theme_mode}
|
||||
name="theme_light"
|
||||
value={'light'}
|
||||
>
|
||||
@@ -159,7 +159,7 @@ function handle_clear_storage(item: null|string) {
|
||||
on:change={() => {
|
||||
$slct_trigger = 'set_theme_mode';
|
||||
}}
|
||||
bind:group={$ae_loc.hub.theme_mode}
|
||||
bind:group={$ae_loc.app_cfg.theme_mode}
|
||||
name="theme_dark"
|
||||
value={'dark'}
|
||||
>
|
||||
@@ -174,7 +174,7 @@ function handle_clear_storage(item: null|string) {
|
||||
on:change={() => {
|
||||
$slct_trigger = 'set_theme_name';
|
||||
}}
|
||||
bind:value={$ae_loc.hub.theme_name}
|
||||
bind:value={$ae_loc.app_cfg.theme_name}
|
||||
class="select"
|
||||
title="Theme name"
|
||||
>
|
||||
@@ -269,7 +269,7 @@ function handle_clear_storage(item: null|string) {
|
||||
<button
|
||||
class="btn btn-sm variant-glass-warning ae_cfg_btn hover:transition-all"
|
||||
on:click={() => {
|
||||
$ae_loc.hub.show_element__cfg_detail = !$ae_loc.hub.show_element__cfg_detail;
|
||||
$ae_loc.app_cfg.show_element__cfg_detail = !$ae_loc.app_cfg.show_element__cfg_detail;
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-cog mx-1"></span>
|
||||
|
||||
Reference in New Issue
Block a user