diff --git a/src/lib/e_app_access_type.svelte b/src/lib/e_app_access_type.svelte index d38217e2..e8e257dd 100644 --- a/src/lib/e_app_access_type.svelte +++ b/src/lib/e_app_access_type.svelte @@ -24,17 +24,19 @@ import { events_loc } from '$lib/ae_events_stores'; // *** Setup Svelte properties interface Props { log_lvl?: number; + hide?: null|boolean; + expand?: boolean; show_passcode_input: boolean; trigger_clear_access: null|boolean; - hidden: null|boolean; } let { - log_lvl = 0, - show_passcode_input = false, - trigger_clear_access = null, - hidden = true, - }: Props = $props(); + log_lvl = $bindable(0), + hide = $bindable(false), + expand = $bindable(false), + show_passcode_input = $bindable(false), + trigger_clear_access = $bindable(null), +}: Props = $props(); let entered_passcode: null|string = $state(null); @@ -104,6 +106,7 @@ $effect(() => { $ae_loc = {...$ae_loc, ...access_checks_results}; $ae_loc = $ae_loc; + $ae_loc.sys_menu.expand = false; } else if (trigger) { trigger = false; if (log_lvl) { @@ -277,19 +280,21 @@ function handle_clear_access() { bg-blue-100 text-gray-900 dark:bg-blue-800 dark:text-gray-200 - duration-300 delay-150 hover:delay-1000 hover:ease-out - transition-all hover:transition-all flex flex-col flex-wrap gap-1 items-end justify-center + w-72 max-w-72 - p-1 my-1 + p-1 border-2 border-gray-200 + + duration-300 delay-150 hover:delay-1000 hover:ease-out + transition-all " - class:hidden={hidden} + class:hidden={hide} > +

@@ -461,7 +466,7 @@ function handle_clear_access() { onclick={() => { // handle_clear_access(); // trigger_clear_access = true; - show_passcode_input = !show_passcode_input; + show_passcode_input = true; }} class="btn btn-sm variant-outline-surface hover:preset-tonal-warning border border-warning-500 transition-all" title={`Current user access level: "${$ae_loc.user_access_type}". Click use passcode for a different access level.`} @@ -477,6 +482,7 @@ function handle_clear_access() { onclick={() => { // handle_clear_access(); trigger_clear_access = true; + show_passcode_input = true; // show_passcode_input = true; }} class="btn btn-sm variant-outline-warning hover:preset-tonal-warning border border-warning-500 transition-all" diff --git a/src/lib/e_app_cfg.svelte b/src/lib/e_app_cfg.svelte index 29b47ee6..b91628d2 100644 --- a/src/lib/e_app_cfg.svelte +++ b/src/lib/e_app_cfg.svelte @@ -117,12 +117,15 @@ function handle_clear_storage(item: null|string) { bg-blue-100 text-gray-900 dark:bg-blue-800 dark:text-gray-200 - transition hover:transition-all flex flex-col flex-wrap gap-1 - items-center justify-center + items-end justify-center + w-72 max-w-72 - p-1 my-1 + p-1 border-2 border-gray-200 + + duration-300 delay-150 hover:delay-1000 hover:ease-out + transition-all " class:hidden={hide} > @@ -262,7 +265,6 @@ function handle_clear_storage(item: null|string) { class:justify-end={!expand} -->
@@ -301,7 +303,7 @@ class:justify-end={!expand} -->
+ +
+ + {#if $ae_loc?.person_id && $ae_loc?.user_id} + + {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name} + {:else} + + Sign in? + {/if} + + + +
+ diff --git a/src/lib/e_app_sys_menu.svelte b/src/lib/e_app_sys_menu.svelte index fb30f5c5..9f4dfa1a 100644 --- a/src/lib/e_app_sys_menu.svelte +++ b/src/lib/e_app_sys_menu.svelte @@ -74,13 +74,13 @@ max-w-max --> transition hover:transition-all z-10 hover:z-20 " - class:hidden={!$ae_loc?.sys_menu?.expand_btn} + class:hidden={!expand_btn} > --> - + - +
duration-500 hover:duration-200 ease-in-out " - class:top-0={$ae_loc?.sys_menu?.expand & 1 == 3} - class:w-full={$ae_loc?.sys_menu?.expand} + class:top-0={expand && 1 == 3} + class:w-full={expand} class:hidden={false} - class:border-transparent={!$ae_loc?.sys_menu?.expand} + class:border-transparent={!expand} - class:hover:bg-transparent={!$ae_loc?.sys_menu?.expand} + class:hover:bg-transparent={!expand} > - +
{#if $ae_loc?.person_id || $ae_loc?.user_id} - +
- - {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name}
- - - {$ae_loc?.user?.username ?? '-- not set --'}
- + + + + {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name} + + + + + + + + {$ae_loc?.user?.username ?? '-- not set --'} + + +
{/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.edit_mode} {:else if $ae_loc.authenticated_access} @@ -209,164 +385,46 @@ max-w-max --> $ae_loc.edit_mode = true; // dispatch_edit_mode_changed(); }} - class="btn btn-md px-2 variant-ghost-warning hover:variant-filled-warning transition-all space-x-0 *:hover:inline" + class=" + btn btn-sm text-xs + preset-tonal-surface + preset-outlined-warning-400-600 + hover:preset-tonal-warning + transition-all group + gap-1 + " title="Edit mode is currently disabled. Click to enable." > - - Edit -