style(journals): apply expanded 80-width formatting and snake_case

- Batch formatted all Journals module files using Prettier with printWidth: 80.
- Refactored preventDefault to prevent_default across all Svelte components.
- Standardized line breaks for imports and long attribute lists for better readability.
- Ensured consistent snake_case naming for internal identifiers.
This commit is contained in:
Scott Idem
2026-02-06 14:15:43 -05:00
parent 07dd6c18a1
commit 2f3125c64b
37 changed files with 3033 additions and 1133 deletions

View File

@@ -22,10 +22,7 @@
import { untrack } from 'svelte';
// *** Import Aether specific variables and functions
import {
ae_loc,
ae_api
} from '$lib/stores/ae_stores';
import { ae_loc, ae_api } from '$lib/stores/ae_stores';
import {
journals_loc,
journals_sess
@@ -37,10 +34,7 @@
show?: boolean;
}
let {
log_lvl = 0,
show = $bindable(false)
}: Props = $props();
let { log_lvl = 0, show = $bindable(false) }: Props = $props();
// Internal State
let tab: 'form' | 'local_json' | 'session_json' = $state('form');
@@ -84,24 +78,32 @@
<div class="space-y-6 py-2 h-[60vh] overflow-y-auto px-4">
<!-- Navigation Tabs -->
<div class="flex justify-center gap-1 mb-4 p-1 bg-surface-500/10 rounded-lg max-w-fit mx-auto sticky top-0 z-10 backdrop-blur-sm">
<div
class="flex justify-center gap-1 mb-4 p-1 bg-surface-500/10 rounded-lg max-w-fit mx-auto sticky top-0 z-10 backdrop-blur-sm"
>
<button
type="button"
class="btn btn-sm transition-all {tab === 'form' ? 'variant-filled-primary' : 'variant-soft-surface'}"
class="btn btn-sm transition-all {tab === 'form'
? 'variant-filled-primary'
: 'variant-soft-surface'}"
onclick={() => (tab = 'form')}
>
<Settings size="1.1em" class="mr-1" /> Config
</button>
<button
type="button"
class="btn btn-sm transition-all {tab === 'local_json' ? 'variant-filled-primary' : 'variant-soft-surface'}"
class="btn btn-sm transition-all {tab === 'local_json'
? 'variant-filled-primary'
: 'variant-soft-surface'}"
onclick={() => (tab = 'local_json')}
>
<Database size="1.1em" class="mr-1" /> Local JSON
</button>
<button
type="button"
class="btn btn-sm transition-all {tab === 'session_json' ? 'variant-filled-primary' : 'variant-soft-surface'}"
class="btn btn-sm transition-all {tab === 'session_json'
? 'variant-filled-primary'
: 'variant-soft-surface'}"
onclick={() => (tab = 'session_json')}
>
<CodeXml size="1.1em" class="mr-1" /> Session JSON
@@ -112,29 +114,61 @@
<div class="space-y-8 animate-in fade-in duration-300">
<!-- Date/Time Section -->
<section class="space-y-4">
<h2 class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<h2
class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2"
>
<CalendarClock size="1.2em" class="text-primary-500" />
Date and Time Display
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 p-2">
<label class="label">
<span class="text-sm font-bold opacity-70">DateTime Format</span>
<select bind:value={tmp_config.datetime_format} class="select select-sm variant-form-material">
<option value="datetime_12_short">MMM D, YY hh:mm A</option>
<option value="datetime_12_long">MMMM D, YYYY hh:mm A</option>
<option value="datetime_short">MMM D, YY HH:mm</option>
<option value="datetime_long">MMMM D, YYYY HH:mm</option>
<option value="datetime_us">US (MM/DD/YYYY hh:mm:ss A)</option>
<option value="datetime_iso">ISO (YYYY-MM-DD HH:mm:ss)</option>
<span class="text-sm font-bold opacity-70"
>DateTime Format</span
>
<select
bind:value={tmp_config.datetime_format}
class="select select-sm variant-form-material"
>
<option value="datetime_12_short"
>MMM D, YY hh:mm A</option
>
<option value="datetime_12_long"
>MMMM D, YYYY hh:mm A</option
>
<option value="datetime_short"
>MMM D, YY HH:mm</option
>
<option value="datetime_long"
>MMMM D, YYYY HH:mm</option
>
<option value="datetime_us"
>US (MM/DD/YYYY hh:mm:ss A)</option
>
<option value="datetime_iso"
>ISO (YYYY-MM-DD HH:mm:ss)</option
>
</select>
</label>
<label class="label">
<span class="text-sm font-bold opacity-70">Time-Only Format</span>
<select bind:value={tmp_config.time_format} class="select select-sm variant-form-material">
<option value="time_12_short">12-hour short (3:30 PM)</option>
<option value="time_12_long">12-hour long (3:30:45 PM)</option>
<option value="time_short">24-hour short (15:30)</option>
<option value="time_long">24-hour long (15:30:45)</option>
<span class="text-sm font-bold opacity-70"
>Time-Only Format</span
>
<select
bind:value={tmp_config.time_format}
class="select select-sm variant-form-material"
>
<option value="time_12_short"
>12-hour short (3:30 PM)</option
>
<option value="time_12_long"
>12-hour long (3:30:45 PM)</option
>
<option value="time_short"
>24-hour short (15:30)</option
>
<option value="time_long"
>24-hour long (15:30:45)</option
>
</select>
</label>
</div>
@@ -142,23 +176,45 @@
<!-- UI Section -->
<section class="space-y-4">
<h2 class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<MousePointerClick size="1.2em" class="text-primary-500" />
<h2
class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2"
>
<MousePointerClick
size="1.2em"
class="text-primary-500"
/>
User Interface Preferences
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 p-2">
<label class="flex items-center space-x-3 cursor-pointer p-2 rounded-lg bg-surface-500/5 border border-surface-500/10">
<input type="checkbox" bind:checked={tmp_config.entry.auto_save} class="checkbox" />
<label
class="flex items-center space-x-3 cursor-pointer p-2 rounded-lg bg-surface-500/5 border border-surface-500/10"
>
<input
type="checkbox"
bind:checked={tmp_config.entry.auto_save}
class="checkbox"
/>
<div class="space-y-0.5">
<span class="font-bold">Enable Auto-Save</span>
<p class="text-xs opacity-60">Automatically sync changes while editing</p>
<p class="text-xs opacity-60">
Automatically sync changes while editing
</p>
</div>
</label>
<label class="flex items-center space-x-3 cursor-pointer p-2 rounded-lg bg-surface-500/5 border border-surface-500/10">
<input type="checkbox" bind:checked={tmp_config.show_id_random} class="checkbox" />
<label
class="flex items-center space-x-3 cursor-pointer p-2 rounded-lg bg-surface-500/5 border border-surface-500/10"
>
<input
type="checkbox"
bind:checked={tmp_config.show_id_random}
class="checkbox"
/>
<div class="space-y-0.5">
<span class="font-bold">Show Technical IDs</span>
<p class="text-xs opacity-60">Display UUIDs in metadata footers</p>
<span class="font-bold">Show Technical IDs</span
>
<p class="text-xs opacity-60">
Display UUIDs in metadata footers
</p>
</div>
</label>
</div>
@@ -166,30 +222,53 @@
<!-- Journal Query Filters Section -->
<section class="space-y-4">
<h2 class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<h2
class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2"
>
<Database size="1.2em" class="text-primary-500" />
Journal Query Filters
</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 p-2">
<label class="label">
<span class="text-sm font-bold opacity-70">Enabled Status</span>
<select bind:value={tmp_config.journal.qry__enabled} class="select select-sm variant-form-material">
<span class="text-sm font-bold opacity-70"
>Enabled Status</span
>
<select
bind:value={tmp_config.journal.qry__enabled}
class="select select-sm variant-form-material"
>
<option value="enabled">Enabled Only</option>
<option value="not_enabled">Disabled Only</option>
<option value="all">All (Enabled & Disabled & NULL)</option>
<option value="not_enabled"
>Disabled Only</option
>
<option value="all"
>All (Enabled & Disabled & NULL)</option
>
</select>
</label>
<label class="label">
<span class="text-sm font-bold opacity-70">Hidden Status</span>
<select bind:value={tmp_config.journal.qry__hidden} class="select select-sm variant-form-material">
<span class="text-sm font-bold opacity-70"
>Hidden Status</span
>
<select
bind:value={tmp_config.journal.qry__hidden}
class="select select-sm variant-form-material"
>
<option value="not_hidden">Visible Only</option>
<option value="hidden">Hidden Only</option>
<option value="all">All (Visible & Hidden & NULL)</option>
<option value="all"
>All (Visible & Hidden & NULL)</option
>
</select>
</label>
<label class="label">
<span class="text-sm font-bold opacity-70">Query Limit</span>
<select bind:value={tmp_config.journal.qry__limit} class="select select-sm variant-form-material">
<label class="label">
<span class="text-sm font-bold opacity-70"
>Query Limit</span
>
<select
bind:value={tmp_config.journal.qry__limit}
class="select select-sm variant-form-material"
>
<option value={10}>10</option>
<option value={20}>20</option>
<option value={50}>50</option>
@@ -204,30 +283,53 @@
<!-- Entry Query Filters Section -->
<section class="space-y-4">
<h2 class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<h2
class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2"
>
<Database size="1.2em" class="text-primary-500" />
Entry Query Filters
</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 p-2">
<label class="label">
<span class="text-sm font-bold opacity-70">Enabled Status</span>
<select bind:value={tmp_config.entry.qry__enabled} class="select select-sm variant-form-material">
<span class="text-sm font-bold opacity-70"
>Enabled Status</span
>
<select
bind:value={tmp_config.entry.qry__enabled}
class="select select-sm variant-form-material"
>
<option value="enabled">Enabled Only</option>
<option value="not_enabled">Disabled Only</option>
<option value="all">All (Enabled & Disabled & NULL)</option>
<option value="not_enabled"
>Disabled Only</option
>
<option value="all"
>All (Enabled & Disabled & NULL)</option
>
</select>
</label>
<label class="label">
<span class="text-sm font-bold opacity-70">Hidden Status</span>
<select bind:value={tmp_config.entry.qry__hidden} class="select select-sm variant-form-material">
<span class="text-sm font-bold opacity-70"
>Hidden Status</span
>
<select
bind:value={tmp_config.entry.qry__hidden}
class="select select-sm variant-form-material"
>
<option value="not_hidden">Visible Only</option>
<option value="hidden">Hidden Only</option>
<option value="all">All (Visible & Hidden & NULL)</option>
<option value="all"
>All (Visible & Hidden & NULL)</option
>
</select>
</label>
<label class="label">
<span class="text-sm font-bold opacity-70">Query Limit</span>
<select bind:value={tmp_config.entry.qry__limit} class="select select-sm variant-form-material">
<label class="label">
<span class="text-sm font-bold opacity-70"
>Query Limit</span
>
<select
bind:value={tmp_config.entry.qry__limit}
class="select select-sm variant-form-material"
>
<option value={10}>10</option>
<option value={20}>20</option>
<option value={50}>50</option>
@@ -242,17 +344,31 @@
<!-- Security Section -->
<section class="space-y-4">
<h2 class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<h2
class="text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2"
>
<ShieldCheck size="1.2em" class="text-primary-500" />
Security & Encryption
</h2>
<div class="p-4 bg-orange-500/5 rounded-lg border border-orange-500/20 space-y-4">
<div
class="p-4 bg-orange-500/5 rounded-lg border border-orange-500/20 space-y-4"
>
<div class="text-sm opacity-80 italic">
Global security overrides for the journal module.
</div>
<label class="flex items-center space-x-3 cursor-pointer">
<input type="checkbox" bind:checked={$journals_sess.enable_session_passcode_cache} class="checkbox checkbox-primary" />
<span class="text-sm font-bold">Cache Passcodes in Session</span>
<label
class="flex items-center space-x-3 cursor-pointer"
>
<input
type="checkbox"
bind:checked={
$journals_sess.enable_session_passcode_cache
}
class="checkbox checkbox-primary"
/>
<span class="text-sm font-bold"
>Cache Passcodes in Session</span
>
</label>
</div>
</section>
@@ -280,12 +396,20 @@
{#snippet footer()}
<div class="flex gap-4">
<button type="button" class="btn variant-ghost-surface font-bold min-w-[100px]" onclick={() => (show = false)}>
<button
type="button"
class="btn variant-ghost-surface font-bold min-w-[100px]"
onclick={() => (show = false)}
>
<X size="1.2em" class="mr-2" /> Cancel
</button>
<button type="button" class="btn variant-filled-primary font-bold shadow-lg min-w-[120px]" onclick={handle_save}>
<button
type="button"
class="btn variant-filled-primary font-bold shadow-lg min-w-[120px]"
onclick={handle_save}
>
<Check size="1.2em" class="mr-2" /> Save Changes
</button>
</div>
{/snippet}
</Modal>
</Modal>