Work on the system and debug menus

This commit is contained in:
Scott Idem
2025-07-15 16:16:10 -04:00
parent 6c79be7179
commit 8692771efb
4 changed files with 78 additions and 26 deletions

View File

@@ -109,6 +109,31 @@ let flag_denied: boolean = $state(false); // Access Denied
// let flag_reason: string = $state(''); // Reason: New version, Expired Cache, Access Denied
// BEGIN: Sanity Checks:
// Added 2025-07-15
if (!$ae_loc?.sys_menu) {
$ae_loc.sys_menu = {
hide: false,
expand: 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,
};
}
// Added 2025-07-15
if (!$ae_loc?.debug_menu) {
$ae_loc.debug_menu = {
hide: false,
expand: false,
};
}
if (!$ae_loc?.app_cfg) {
flag_reload = true;
flag_expired = true;
@@ -119,6 +144,7 @@ if (!$ae_loc?.app_cfg) {
// $ae_loc.app_cfg.show_element__menu_btn = true;
// $ae_loc.app_cfg.show_element__menu = false;
}
if (!$ae_loc?.ver) {
flag_reload = true;
flag_expired = true;
@@ -919,10 +945,17 @@ $effect(() => {
{#if (browser) }
<!-- Always show if Trusted access or higher. Do not show if in iframe mode. -->
{#if !$ae_loc?.iframe || $ae_loc?.trusted_access}
<E_app_sys_menu data={data} />
<E_app_sys_menu
data={data}
hide={$ae_loc.sys_menu.hide}
expand={$ae_loc.sys_menu.expand}
/>
<!-- The app debug menu -->
<E_app_debug_menu />
<E_app_debug_menu
hide={$ae_loc.debug_menu.hide}
expand={$ae_loc.debug_menu.expand}
/>
{:else}
<!-- Nothing to show -->
{/if}