Fix ReferenceError: CalendarClock and Bot not defined in Journals Config modal
This commit is contained in:
@@ -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,143 +164,104 @@
|
|||||||
<!-- 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>
|
||||||
|
<select
|
||||||
<!-- datetime_format - default 'datetime_12_long'; select options -->
|
bind:value={$journals_loc.datetime_format}
|
||||||
<label class="flex items-center justify-start gap-1">
|
class="select"
|
||||||
DateTime Format:
|
|
||||||
<select
|
|
||||||
bind:value={$journals_loc.datetime_format}
|
|
||||||
class="select select-sm select-bordered w-full max-w-xs p-1"
|
|
||||||
>
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- time_format - default 'time_12_short'; select options -->
|
|
||||||
<label class="flex items-center justify-start gap-1">
|
|
||||||
Time Format:
|
|
||||||
<select
|
|
||||||
bind:value={$journals_loc.time_format}
|
|
||||||
class="select select-sm select-bordered w-full max-w-xs p-1"
|
|
||||||
>
|
|
||||||
<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_short">24-hour short (e.g., 15:30)</option>
|
|
||||||
<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>
|
<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>Time Format</span>
|
||||||
|
<select
|
||||||
|
bind:value={$journals_loc.time_format}
|
||||||
|
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>
|
||||||
|
<option value="time_short">24-hour short (e.g., 15:30)</option>
|
||||||
|
<option value="time_long">24-hour long (e.g., 15:30:45)</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<button
|
<div class="space-y-4 bg-surface-500/5 p-4 rounded-lg">
|
||||||
type="button"
|
<button
|
||||||
class="btn btn-sm preset-outlined-primary-400-600"
|
type="button"
|
||||||
onclick={() => {
|
class="btn variant-ghost-primary w-full md:w-auto"
|
||||||
$journals_loc.llm__api_base_url =
|
onclick={() => {
|
||||||
$ae_loc.site_cfg_json?.llm__api_base_url ??
|
$journals_loc.llm__api_base_url =
|
||||||
'https://ai.dgrzone.com/api';
|
$ae_loc.site_cfg_json?.llm__api_base_url ??
|
||||||
$journals_loc.llm__api_model =
|
'https://ai.dgrzone.com/api';
|
||||||
$ae_loc.site_cfg_json?.llm__api_model ??
|
$journals_loc.llm__api_model =
|
||||||
'dgrzone-deepseek-8b-quick';
|
$ae_loc.site_cfg_json?.llm__api_model ??
|
||||||
$journals_loc.llm__api_token =
|
'dgrzone-deepseek-8b-quick';
|
||||||
$ae_loc.site_cfg_json?.llm__api_token ?? '';
|
$journals_loc.llm__api_token =
|
||||||
$journals_loc.llm__api_dangerous_browser =
|
$ae_loc.site_cfg_json?.llm__api_token ?? '';
|
||||||
$ae_loc.site_cfg_json?.llm__api_dangerous_browser ?? false;
|
$journals_loc.llm__api_dangerous_browser =
|
||||||
$journals_loc.entry.llm__system_prompt =
|
$ae_loc.site_cfg_json?.llm__api_dangerous_browser ?? false;
|
||||||
$ae_loc.site_cfg_json?.llm__system_prompt ?? '';
|
$journals_loc.entry.llm__system_prompt =
|
||||||
}}
|
$ae_loc.site_cfg_json?.llm__system_prompt ?? '';
|
||||||
>
|
}}
|
||||||
<Copy class="inline-block mr-1" />
|
>
|
||||||
LLM from Site Cfg
|
<Copy size="1em" class="mr-2" />
|
||||||
</button>
|
Sync from Site Configuration
|
||||||
|
</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}
|
class="input"
|
||||||
placeholder="LLM API Model"
|
/>
|
||||||
class="input input-sm input-bordered w-full max-w-xs"
|
</label>
|
||||||
/>
|
</div>
|
||||||
</label>
|
|
||||||
|
|
||||||
<!-- 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="password"
|
||||||
type="text"
|
bind:value={$journals_loc.llm__api_token}
|
||||||
bind:value={$journals_loc.llm__api_token}
|
class="input font-mono"
|
||||||
placeholder="LLM API Token"
|
/>
|
||||||
class="input input-sm input-bordered w-full max-w-4xl"
|
</label>
|
||||||
/>
|
</div>
|
||||||
</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">
|
<div class="w-full space-y-2 p-2 border-t border-surface-100-900">
|
||||||
|
|||||||
Reference in New Issue
Block a user