-
+
+
+
{$ae_loc?.user?.username ?? '-- not set --'}
-
+
-
+
{#if $ae_loc.edit_mode}
{/if}
-
+
{/if}
-
-
- {#if $ae_loc?.person_id && $ae_loc?.user_id}
-
- {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name}
- {:else}
-
-
- User sign in:
- {/if}
-
-
-
-
diff --git a/src/lib/app_components/e_app_sys_bar.svelte b/src/lib/app_components/e_app_sys_bar.svelte
index 7b64937a..c8073dd9 100644
--- a/src/lib/app_components/e_app_sys_bar.svelte
+++ b/src/lib/app_components/e_app_sys_bar.svelte
@@ -15,6 +15,7 @@
import {
Bug,
CircleX,
+ LogOut,
Menu,
Moon,
Sun,
@@ -91,7 +92,10 @@
$ae_sess.sys_menu.expand = true;
$ae_loc.app_cfg.show_element__access_type = true;
- if ($ae_loc?.access_type === 'anonymous') {
+ if (!$ae_loc?.access_type || $ae_loc?.access_type === 'anonymous') {
+ // onDestroy in Element_access_type resets show_element__passcode_input to false
+ // on panel close, so we must restore it here for menu-button opens too.
+ $ae_sess.app_cfg.show_element__passcode_input = true;
$ae_sess.sys_menu.focus_passcode_input = true;
} else {
$ae_loc.sys_menu.expand_user = false;
@@ -139,8 +143,8 @@
$ae_loc.sys_menu.expand_access_type = true;
$ae_sess.app_cfg.show_element__passcode_input = true;
$ae_sess.sys_menu.focus_passcode_input = true;
- const to_focus = document.getElementById('access_passcode_input');
- to_focus?.focus();
+ // Note: focus is handled reactively by the focus_input binding in Element_access_type.
+ // Direct getElementById here would fail — the panel DOM doesn't exist yet at this point.
}
}
@@ -265,9 +269,17 @@
class="w-full flex items-center justify-between px-3 py-2 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors"
onclick={() => sec_signin = !sec_signin}
>
-
-
- Sign In / Out
+
+ {#if $ae_loc?.person_id && $ae_loc?.user_id}
+
+ Sign Out
+
+ {$ae_loc?.user?.username ?? person_display ?? ''}
+
+ {:else}
+
+ User Sign In
+ {/if}
{sec_signin ? '▲' : '▼'}
@@ -290,11 +302,20 @@
class="w-full flex items-center justify-between px-3 py-2 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors"
onclick={() => sec_access = !sec_access}
>
-
-
- Access / Passcode
- {#if access_label}
- ({access_label})
+
+ {#if $ae_loc?.access_type && $ae_loc?.access_type !== 'anonymous'}
+ {#if $ae_loc?.user_access_type && $ae_loc?.access_type !== $ae_loc?.user_access_type}
+
+ Elevated Access
+ ({access_label})
+ {:else}
+
+ Access
+ ({access_label})
+ {/if}
+ {:else}
+
+ Enter Passcode
{/if}
{sec_access ? '▲' : '▼'}
@@ -330,29 +351,18 @@
{sec_appearance ? '▲' : '▼'}
{#if sec_appearance}
-
+
-
-
-
Theme
-
-
-
-
-
+
+
+
+
+
Theme
+
+
+
{/if}