From d8616ea5fd5341331c02b1f62950fc0eb56cf2fa Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 5 May 2026 14:10:12 -0400 Subject: [PATCH] Normalize Journals config tabs --- .../ae_comp__modal_journal_config.svelte | 66 +++++++++---------- ...ae_comp__modal_journal_entry_config.svelte | 23 ++++--- 2 files changed, 43 insertions(+), 46 deletions(-) diff --git a/src/routes/journals/ae_comp__modal_journal_config.svelte b/src/routes/journals/ae_comp__modal_journal_config.svelte index 61bc3af3..92efc50f 100644 --- a/src/routes/journals/ae_comp__modal_journal_config.svelte +++ b/src/routes/journals/ae_comp__modal_journal_config.svelte @@ -43,6 +43,16 @@ let tmp_config: any = $state({ entry: {} }); +const panel_class = 'space-y-4 rounded-xl border border-surface-500/20 bg-surface-500/5 p-4 shadow-sm'; +const panel_title_class = 'flex items-center gap-2 border-b border-surface-500/20 pb-2 text-lg font-bold'; +const tab_button_base_class = 'btn btn-sm border transition-all duration-200'; +const tab_button_active_class = 'border-surface-200-800 bg-surface-200-800 text-surface-950-50 shadow-sm'; +const tab_button_inactive_class = 'border-transparent bg-surface-50-900/60 text-surface-600-400 hover:border-surface-200-800 hover:bg-surface-100-900 hover:text-surface-950-50'; + +function tab_button_class(is_active: boolean): string { + return `${tab_button_base_class} ${is_active ? tab_button_active_class : tab_button_inactive_class}`; +} + $effect(() => { if (show) { untrack(() => { @@ -66,9 +76,9 @@ function handle_save() { dismissable={false} placement="top-center" size="xl" - class="relative mx-auto flex w-full flex-col rounded-lg border border-orange-300 bg-white text-gray-800 shadow-xl dark:border-orange-700 dark:bg-gray-800 dark:text-gray-200" - headerClass="flex flex-row gap-2 items-center justify-between w-full bg-orange-100 dark:bg-orange-900 p-4 rounded-t-lg border-b border-orange-200 dark:border-orange-800" - footerClass="flex flex-row gap-2 items-center justify-center w-full bg-orange-100 dark:bg-orange-900 p-4 rounded-b-lg border-t border-orange-200 dark:border-orange-800"> + class="relative mx-auto flex h-[calc(100dvh-2rem)] max-h-[calc(100dvh-2rem)] w-full flex-col rounded-xl border border-surface-200-800 bg-surface-50-900 text-surface-950-50 shadow-xl" + headerClass="flex w-full flex-row items-center justify-between gap-2 rounded-t-xl border-b border-surface-200-800 bg-surface-100-900 p-4" + footerClass="flex w-full flex-row items-center justify-center gap-2 rounded-b-xl border-t border-surface-200-800 bg-surface-100-900 p-4"> {#snippet header()}

@@ -82,31 +92,25 @@ function handle_save() { {/snippet} -
+
@@ -115,9 +119,8 @@ function handle_save() { {#if tab === 'form'}
-
-

+
+

Date and Time Display

@@ -162,9 +165,8 @@ function handle_save() {
-
-

+
+

@@ -202,9 +204,8 @@ function handle_save() {

-
-

+
+

Journal Query Filters

@@ -253,9 +254,8 @@ function handle_save() {
-
-

+
+

Entry Query Filters

@@ -304,14 +304,12 @@ function handle_save() {
-
-

+
+

Security & Encryption

-
+
Global security overrides for the journal module.
@@ -330,7 +328,7 @@ function handle_save() {

{:else if tab === 'local_json'} -
+
{:else if tab === 'session_json'} -
+
diff --git a/src/routes/journals/ae_comp__modal_journal_entry_config.svelte b/src/routes/journals/ae_comp__modal_journal_entry_config.svelte index 0a0a47aa..bf2bfbf6 100644 --- a/src/routes/journals/ae_comp__modal_journal_entry_config.svelte +++ b/src/routes/journals/ae_comp__modal_journal_entry_config.svelte @@ -66,6 +66,13 @@ const normalize_date = (val?: string | Date | null) => { const panel_class = 'space-y-4 rounded-xl border border-surface-500/20 bg-surface-500/5 p-4 shadow-sm'; const panel_title_class = 'flex items-center gap-2 border-b border-surface-500/20 pb-2 text-lg font-bold'; const field_card_class = 'bg-surface-500/5 border-surface-500/10 flex cursor-pointer items-center space-x-3 rounded-lg border p-3 transition-colors hover:bg-surface-500/10'; +const tab_button_base_class = 'btn btn-sm border transition-all duration-200'; +const tab_button_active_class = 'border-surface-200-800 bg-surface-200-800 text-surface-950-50 shadow-sm'; +const tab_button_inactive_class = 'border-transparent bg-surface-50-900/60 text-surface-600-400 hover:border-surface-200-800 hover:bg-surface-100-900 hover:text-surface-950-50'; + +function tab_button_class(is_active: boolean): string { + return `${tab_button_base_class} ${is_active ? tab_button_active_class : tab_button_inactive_class}`; +} async function handle_update_entry() { try { @@ -162,33 +169,25 @@ async function handle_admin_delete_action() { class="bg-surface-500/10 sticky top-0 z-10 mx-auto mb-4 flex max-w-fit justify-center gap-1 rounded-lg p-1 backdrop-blur-sm">