diff --git a/src/lib/ae_stores.ts b/src/lib/ae_stores.ts index 4040dbb9..1b9a9bb1 100644 --- a/src/lib/ae_stores.ts +++ b/src/lib/ae_stores.ts @@ -66,9 +66,10 @@ const ae_app_local_data_defaults: key_val = { iframe: false, title: `OSIT's Æ`, // - Dev SvelteKit`, // Æ - debug: false, // A simple flag to know if we should show debug information. - edit_mode: false, // A simple flag to know if we should show edit mode options. - sync_local_config: true, // A simple flag to know if we should sync local config with the remote API server. + debug_menu: false, // Flag show debug menu. + debug_mode: false, // Flag to know if we should be in debug mode and show show debug options. + edit_mode: false, // Flag to know if we should be in edit mode and show edit options. + sync_local_config: true, // Flag to know if we should sync local config with the remote API server. 'account_id': ae_account_id, // OSIT Demo _XY7DXtc9MY 'account_code': 'not_set', diff --git a/src/lib/element_access_type.svelte b/src/lib/e_app_access_type.svelte similarity index 100% rename from src/lib/element_access_type.svelte rename to src/lib/e_app_access_type.svelte diff --git a/src/lib/element_app_cfg.svelte b/src/lib/e_app_cfg.svelte similarity index 99% rename from src/lib/element_app_cfg.svelte rename to src/lib/e_app_cfg.svelte index 05fe32aa..3a450666 100644 --- a/src/lib/element_app_cfg.svelte +++ b/src/lib/e_app_cfg.svelte @@ -5,7 +5,7 @@ import { RadioGroup, RadioItem } from '@skeletonlabs/skeleton'; import { ae_util } from '$lib/ae_utils/ae_utils'; import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores'; -import Element_theme from '$lib/element_theme.svelte'; +import Element_theme from '$lib/e_app_theme.svelte'; let notes: null|string = null; let all: boolean = false; diff --git a/src/lib/e_app_debug_menu.svelte b/src/lib/e_app_debug_menu.svelte new file mode 100644 index 00000000..2b5e0ea2 --- /dev/null +++ b/src/lib/e_app_debug_menu.svelte @@ -0,0 +1,247 @@ + + + + + + +
+ +
+ + +
+ + + Debug +
+ +
+            {JSON.stringify($ae_loc, null, 2)}
+        
+ +
+ + + + + + + + +
+ + + diff --git a/src/lib/element_sign_in_out.svelte b/src/lib/e_app_sign_in_out.svelte similarity index 100% rename from src/lib/element_sign_in_out.svelte rename to src/lib/e_app_sign_in_out.svelte diff --git a/src/lib/e_app_sys_menu.svelte b/src/lib/e_app_sys_menu.svelte new file mode 100644 index 00000000..fd857bb6 --- /dev/null +++ b/src/lib/e_app_sys_menu.svelte @@ -0,0 +1,380 @@ + + + + + +
+ + + + {#if $ae_loc.edit_mode} + + {:else if $ae_loc.authenticated_access} + + {/if} + +
+ {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} + + + + + + {#if $ae_loc.access_type == 'super'} + + + {:else if $ae_loc.access_type == 'manager'} + + + {:else if $ae_loc.access_type == 'administrator'} + + + {:else if $ae_loc.access_type == 'trusted'} + + + {:else if $ae_loc.access_type == 'public'} + Public + + {:else if $ae_loc.access_type == 'authenticated'} + Authenticated + + {:else if $ae_loc.access_type == 'anonymous'} + Anonymous Access + {:else} + Unknown Access + {/if} + + + {#if $ae_loc?.user_access_type && $ae_loc?.access_type == $ae_loc?.user_access_type} + + {:else} + + {/if} + {:else} + + {/if} +
+ + + + + +
+ + + +
+ + + + + + + + {#if $ae_loc?.app_cfg?.show_element__sign_in_out} +
diff --git a/src/lib/element_theme.svelte b/src/lib/e_app_theme.svelte similarity index 100% rename from src/lib/element_theme.svelte rename to src/lib/e_app_theme.svelte diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 81395ced..44ee7b26 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -5,7 +5,7 @@ let log_lvl: number = 0; // *** Import Svelte specific -import { tick } from 'svelte'; +// import { tick } from 'svelte'; import { goto, invalidateAll } from '$app/navigation'; import '../app.postcss'; @@ -27,15 +27,15 @@ const modalRegistry: Record = { }; import { ArrowBigRight, - CircleX, - Eye, EyeOff, - Key, - LogIn, LogOut, LockKeyhole, - Mail, MailCheck, - Menu, + // CircleX, + // Eye, EyeOff, + // Key, + // LogIn, LogOut, LockKeyhole, + // Mail, MailCheck, + // Menu, RefreshCw, RefreshCcwDot, - ShieldEllipsis, ShieldMinus, ShieldPlus, ShieldUser, - User, UserCheck + // ShieldEllipsis, ShieldMinus, ShieldPlus, ShieldUser, + // User, UserCheck } from '@lucide/svelte'; // Highlight JS @@ -62,9 +62,11 @@ import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores'; import { events_loc, events_slct } from '$lib/ae_events_stores'; // import type { key_val } from '$lib/ae_stores'; -import Element_access_type from '$lib/element_access_type.svelte'; -import Element_app_cfg from '$lib/element_app_cfg.svelte'; -import Element_sign_in_out from '$lib/element_sign_in_out.svelte'; +import E_app_debug_menu from '$lib/e_app_debug_menu.svelte'; +import E_app_sys_menu from '$lib/e_app_sys_menu.svelte'; +// import Element_access_type from '$lib/element_access_type.svelte'; +// import Element_app_cfg from '$lib/element_app_cfg.svelte'; +// import Element_sign_in_out from '$lib/element_sign_in_out.svelte'; // import Element_data_store from '$lib/element_data_store_v2.svelte'; @@ -914,512 +916,14 @@ $effect(() => { {/if} - - {#if (browser) } - -
- - - - {#if $ae_loc.edit_mode} - - {:else if $ae_loc.authenticated_access} - - {/if} - -
- {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} - - - - - - {#if $ae_loc.access_type == 'super'} - - - {:else if $ae_loc.access_type == 'manager'} - - - {:else if $ae_loc.access_type == 'administrator'} - - - {:else if $ae_loc.access_type == 'trusted'} - - - {:else if $ae_loc.access_type == 'public'} - Public - - {:else if $ae_loc.access_type == 'authenticated'} - Authenticated - - {:else if $ae_loc.access_type == 'anonymous'} - Anonymous Access - {:else} - Unknown Access - {/if} - - - {#if $ae_loc?.user_access_type && $ae_loc?.access_type == $ae_loc?.user_access_type} - - {:else} - - {/if} - {:else} - - {/if} -
- - - - - -
- - - -
- - - - - - - - {#if $ae_loc?.app_cfg?.show_element__sign_in_out} -
+ + + + {/if} - - -
- -
- - -
- - Debug -
- -
-            {JSON.stringify($ae_loc, null, 2)}
-        
- -
- - - - -
-