Fix ReferenceError: CalendarClock and Bot not defined in Journals Config modal

This commit is contained in:
Scott Idem
2026-01-08 16:40:50 -05:00
parent 6146cebaa4
commit b50cbe7972

View File

@@ -17,11 +17,13 @@
ArrowDownUp,
BetweenVerticalEnd,
BetweenVerticalStart,
Bot,
BookHeart,
BookImage,
Bookmark,
BookOpenText,
BriefcaseBusiness,
CalendarClock,
Check,
Copy,
Expand,
@@ -162,20 +164,20 @@
<!-- Section for the configuration form -->
<div
class:hidden={tab !== 'form'}
class="flex flex-col gap-1 items-start justify-start"
class="flex flex-col gap-6 items-start justify-start p-2"
>
<!-- <h2 class="font-semibold"></h2> -->
<div class="w-full space-y-4">
<h2 class="h2 text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<CalendarClock class="text-primary-500" />
Date and Time Settings
</h2>
<div class="w-full space-y-2 p-2 border-t border-surface-100-900">
<h2 class="font-semibold">$journals_loc:</h2>
<h3 class="font-semibold">Date and Time:</h3>
<!-- datetime_format - default 'datetime_12_long'; select options -->
<label class="flex items-center justify-start gap-1">
DateTime Format:
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<label class="label">
<span>DateTime Format</span>
<select
bind:value={$journals_loc.datetime_format}
class="select select-sm select-bordered w-full max-w-xs p-1"
class="select"
>
<option value="datetime_12_short">MMM D, YY hh:mm A</option>
<option value="datetime_12_long">MMMM D, YYYY hh:mm A</option>
@@ -186,12 +188,11 @@
</select>
</label>
<!-- time_format - default 'time_12_short'; select options -->
<label class="flex items-center justify-start gap-1">
Time Format:
<label class="label">
<span>Time Format</span>
<select
bind:value={$journals_loc.time_format}
class="select select-sm select-bordered w-full max-w-xs p-1"
class="select"
>
<option value="time_12_short">12-hour short (e.g., 3:30 PM)</option>
<option value="time_12_long">12-hour long (e.g., 3:30:45 PM)</option>
@@ -199,45 +200,19 @@
<option value="time_long">24-hour long (e.g., 15:30:45)</option>
</select>
</label>
<!-- time_hours 12 or 24; toggle -->
<div class="flex flex-row gap-2 items-center justify-start">
<label class="flex flex-row gap-1 items-center justify-start">
12
<input
type="checkbox"
checked={$journals_loc.time_hours == 12}
value={12}
onchange={() => {
$journals_loc.time_hours = 12;
}}
class="checkbox checkbox-sm"
/>
</label>
<label class="flex flex-row gap-1 items-center justify-start">
24
<input
type="checkbox"
checked={$journals_loc.time_hours == 24}
value={24}
onchange={() => {
$journals_loc.time_hours = 24;
}}
class="checkbox checkbox-sm"
/>
</label>
<span class="text-sm">
Time Format: <span class="font-semibold"
>{$journals_loc.time_hours}-hour</span
>
</span>
</div>
</div>
<h3 class="font-semibold">LLM AI:</h3>
<div class="w-full space-y-4">
<h2 class="h2 text-xl font-bold flex items-center gap-2 border-b border-surface-500/30 pb-2">
<Bot class="text-primary-500" />
AI Summary Configuration
</h2>
<div class="space-y-4 bg-surface-500/5 p-4 rounded-lg">
<button
type="button"
class="btn btn-sm preset-outlined-primary-400-600"
class="btn variant-ghost-primary w-full md:w-auto"
onclick={() => {
$journals_loc.llm__api_base_url =
$ae_loc.site_cfg_json?.llm__api_base_url ??
@@ -253,52 +228,40 @@
$ae_loc.site_cfg_json?.llm__system_prompt ?? '';
}}
>
<Copy class="inline-block mr-1" />
LLM from Site Cfg
<Copy size="1em" class="mr-2" />
Sync from Site Configuration
</button>
<!-- llm__api_base_url - default 'https://ai.dgrzone.com/api'; input url -->
<label class="flex items-center justify-start gap-1">
LLM API Base URL:
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<label class="label">
<span>LLM API Base URL</span>
<input
type="text"
bind:value={$journals_loc.llm__api_base_url}
placeholder="LLM API Base URL"
class="input input-sm input-bordered w-full max-w-xs"
placeholder="https://..."
class="input"
/>
</label>
<!-- llm__api_model - default 'dgrzone-deepseek-8b-quick'; input text -->
<label class="flex items-center justify-start gap-1">
LLM API Model:
<label class="label">
<span>LLM Model</span>
<input
type="text"
bind:value={$journals_loc.llm__api_model}
placeholder="LLM API Model"
class="input input-sm input-bordered w-full max-w-xs"
class="input"
/>
</label>
</div>
<!-- llm__api_token; input text -->
<label class="flex items-center justify-start gap-1">
LLM API Token:
<label class="label">
<span>LLM API Token</span>
<input
type="text"
type="password"
bind:value={$journals_loc.llm__api_token}
placeholder="LLM API Token"
class="input input-sm input-bordered w-full max-w-4xl"
class="input font-mono"
/>
</label>
<!-- llm__api_dangerous_browser - default false; checkbox -->
<label class="flex flex-row gap-1 items-center justify-start">
<input
type="checkbox"
bind:checked={$journals_loc.llm__api_dangerous_browser}
class="checkbox checkbox-sm"
/>
<span class="text-sm"> LLM API Dangerous Browser </span>
</label>
</div>
</div>
<div class="w-full space-y-2 p-2 border-t border-surface-100-900">