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, ArrowDownUp,
BetweenVerticalEnd, BetweenVerticalEnd,
BetweenVerticalStart, BetweenVerticalStart,
Bot,
BookHeart, BookHeart,
BookImage, BookImage,
Bookmark, Bookmark,
BookOpenText, BookOpenText,
BriefcaseBusiness, BriefcaseBusiness,
CalendarClock,
Check, Check,
Copy, Copy,
Expand, Expand,
@@ -162,20 +164,20 @@
<!-- Section for the configuration form --> <!-- Section for the configuration form -->
<div <div
class:hidden={tab !== 'form'} 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"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<h2 class="font-semibold">$journals_loc:</h2> <label class="label">
<h3 class="font-semibold">Date and Time:</h3> <span>DateTime Format</span>
<!-- datetime_format - default 'datetime_12_long'; select options -->
<label class="flex items-center justify-start gap-1">
DateTime Format:
<select <select
bind:value={$journals_loc.datetime_format} 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_short">MMM D, YY hh:mm A</option>
<option value="datetime_12_long">MMMM D, YYYY hh:mm A</option> <option value="datetime_12_long">MMMM D, YYYY hh:mm A</option>
@@ -186,12 +188,11 @@
</select> </select>
</label> </label>
<!-- time_format - default 'time_12_short'; select options --> <label class="label">
<label class="flex items-center justify-start gap-1"> <span>Time Format</span>
Time Format:
<select <select
bind:value={$journals_loc.time_format} 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_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> <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> <option value="time_long">24-hour long (e.g., 15:30:45)</option>
</select> </select>
</label> </label>
</div>
<!-- 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 <button
type="button" type="button"
class="btn btn-sm preset-outlined-primary-400-600" class="btn variant-ghost-primary w-full md:w-auto"
onclick={() => { onclick={() => {
$journals_loc.llm__api_base_url = $journals_loc.llm__api_base_url =
$ae_loc.site_cfg_json?.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 ?? ''; $ae_loc.site_cfg_json?.llm__system_prompt ?? '';
}} }}
> >
<Copy class="inline-block mr-1" /> <Copy size="1em" class="mr-2" />
LLM from Site Cfg Sync from Site Configuration
</button> </button>
<!-- llm__api_base_url - default 'https://ai.dgrzone.com/api'; input url --> <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<label class="flex items-center justify-start gap-1"> <label class="label">
LLM API Base URL: <span>LLM API Base URL</span>
<input <input
type="text" type="text"
bind:value={$journals_loc.llm__api_base_url} bind:value={$journals_loc.llm__api_base_url}
placeholder="LLM API Base URL" placeholder="https://..."
class="input input-sm input-bordered w-full max-w-xs" class="input"
/> />
</label> </label>
<!-- llm__api_model - default 'dgrzone-deepseek-8b-quick'; input text --> <label class="label">
<label class="flex items-center justify-start gap-1"> <span>LLM Model</span>
LLM API Model:
<input <input
type="text" type="text"
bind:value={$journals_loc.llm__api_model} bind:value={$journals_loc.llm__api_model}
placeholder="LLM API Model" class="input"
class="input input-sm input-bordered w-full max-w-xs"
/> />
</label> </label>
</div>
<!-- llm__api_token; input text --> <label class="label">
<label class="flex items-center justify-start gap-1"> <span>LLM API Token</span>
LLM API Token:
<input <input
type="text" type="password"
bind:value={$journals_loc.llm__api_token} bind:value={$journals_loc.llm__api_token}
placeholder="LLM API Token" class="input font-mono"
class="input input-sm input-bordered w-full max-w-4xl"
/> />
</label> </label>
</div>
<!-- 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"> <div class="w-full space-y-2 p-2 border-t border-surface-100-900">