From eaffc44772cf37b347e1f514acba50c5ad451987 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Wed, 16 Jul 2025 13:57:12 -0400 Subject: [PATCH] More work on the system and debug menus and related info. --- src/lib/ae_stores.ts | 9 ++ src/lib/e_app_clipboard.svelte | 57 +++++-- src/lib/e_app_debug_menu.svelte | 39 ++++- src/lib/e_app_sys_menu.svelte | 24 +-- src/routes/+layout.svelte | 259 +++++++++++++++++++++++++++----- src/routes/+page.svelte | 4 + 6 files changed, 320 insertions(+), 72 deletions(-) diff --git a/src/lib/ae_stores.ts b/src/lib/ae_stores.ts index 10bd22e1..38a133c9 100644 --- a/src/lib/ae_stores.ts +++ b/src/lib/ae_stores.ts @@ -181,6 +181,7 @@ const ae_app_local_data_defaults: key_val = { debug_menu: { hide: false, expand: false, + // hide_quick_info: true }, app_cfg: { @@ -334,6 +335,14 @@ let ae_app_session_data_defaults: key_val = { // 'name': 'Aether App Template', // 'theme': 'light', // 'account_id': ae_account_id, + + sys_menu: { + }, + + debug_menu: { + hide_quick_info: true + }, + 'ds': { 'submit_status': null, }, diff --git a/src/lib/e_app_clipboard.svelte b/src/lib/e_app_clipboard.svelte index b4315107..86506f43 100644 --- a/src/lib/e_app_clipboard.svelte +++ b/src/lib/e_app_clipboard.svelte @@ -7,23 +7,43 @@ interface Props { btn_text?: string; btn_title?: string; btn_class?: string; + hide_icon?: boolean; } let { - log_lvl = 1, + log_lvl = 0, value = $bindable(''), success = $bindable(false), btn_text = 'Copy to Clipboard', btn_title = 'Copy to Clipboard', - btn_class = 'btn btn-sm preset-tonal-warning text-warning-500 m-1' + btn_class = 'btn btn-sm preset-tonal-warning text-warning-500 m-1', + hide_icon = false, }: Props = $props(); +// *** Import Svelte specific +import { browser } from '$app/environment'; + +// *** Import other supporting libraries +import { + // ArrowBigRight, + // CircleX, + Copy, + // Eye, EyeOff, + // Key, + // LogIn, LogOut, LockKeyhole, + // Mail, MailCheck, + // Menu, + // RefreshCw, RefreshCcw, RefreshCcwDot, + // ShieldEllipsis, ShieldMinus, ShieldPlus, ShieldUser, + // User, UserCheck + } from '@lucide/svelte'; + if (log_lvl) { console.log(`Clipboard component initialized with value:`, value); } // Select your trigger element -const elemButton: HTMLButtonElement | null = document.querySelector('[data-button]'); +// const elemButton: HTMLButtonElement | null = document.querySelector('[data-button]'); // Add a click event handler to the trigger // elemButton?.addEventListener('click', () => { @@ -46,22 +66,31 @@ const elemButton: HTMLButtonElement | null = document.querySelector('[data-butto type="button" data-button onclick={() => { - // Call the Clipboard API - navigator.clipboard - // Use the `writeText` method write content to the clipboard - .writeText(value) - // Handle confirmation - .then(() => { - if (log_lvl) { - console.log(`Clipboard write successful: ${value}`); - } - success = true; - }); + // if (browser) { + // Call the Clipboard API + navigator.clipboard + // Use the `writeText` method write content to the clipboard + .writeText(value) + // Handle confirmation + .then(() => { + if (log_lvl) { + console.log(`Clipboard write successful: ${value}`); + } + success = true; + }); + // } else { + // if (log_lvl) { + // console.log(`Clipboard write attempted in non-browser environment.`); + // } + // } }} class={btn_class} title={btn_title} > + {btn_text} diff --git a/src/lib/e_app_debug_menu.svelte b/src/lib/e_app_debug_menu.svelte index bc279528..732142fe 100644 --- a/src/lib/e_app_debug_menu.svelte +++ b/src/lib/e_app_debug_menu.svelte @@ -4,7 +4,7 @@ // *** Import other supporting libraries import { Bug, - CircleX, + CircleX, Info, ToggleLeft, ToggleRight, X } from '@lucide/svelte'; @@ -111,10 +111,10 @@ hover:opacity-100 --> $ae_loc.debug_mode = !$ae_loc?.debug_mode; }} class=" - btn btn-sm preset-tonal-surface border-sm border-surface-500 hover:preset-tonal-warning - transition-all *:hover:inline-block - - + btn btn-sm + preset-outlined-surface-400-600 preset-filled-suface-200-800 + hover:preset-tonal-success + transition-all " title="Turn debug content and styles off and on" > @@ -139,6 +139,29 @@ hover:opacity-100 --> + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + +
KeyValue
Datetime ={new Date().toISOString()}
URL ={data.url.href}
Browser{navigator.userAgent}
account_id ={$slct.account_id}
iframe ={$ae_loc?.iframe}
access_type ={$ae_loc?.access_type}
person_id ={$ae_loc?.person_id}
full_name ={$ae_loc?.person?.full_name}
user_id ={$ae_loc?.user_id}
username{$ae_loc?.user?.username}
email ={$ae_loc?.user?.email}
+ + + + {#if (browser && flag_new_ver)}
@@ -936,6 +1141,7 @@ $effect(() => { {@render children?.()} {:else if (browser || flag_reload)} +
@@ -945,34 +1151,7 @@ $effect(() => { {/if} - - - Loading... - - - {#if (browser) } @@ -985,7 +1164,7 @@ $effect(() => { {:else} @@ -993,7 +1172,7 @@ $effect(() => { {/if} {:else} -
+ Reload @@ -1032,13 +1210,12 @@ $effect(() => { class="btn btn-sm m-1 preset-tonal-secondary border-secondary-500 hover:preset-tonal-warning border-warning-500 hover:variant-outline-warning text-error-700 hover:text-error-900 transition-all text-wrap" title="Reload and clear the page cache" > - Clear Cache and Reload -
+
--> {/if} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 4007ab69..79d9690b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -29,6 +29,10 @@ onMount(() => { }); + + {$ae_loc.title ?? 'Æ loading...'} + +