Got themes working again.
This commit is contained in:
@@ -84,6 +84,7 @@ async function handle_update_journal() {
|
||||
type_code: $journals_slct.tmp_journal_obj.type_code,
|
||||
passcode: $journals_slct.tmp_journal_obj.passcode,
|
||||
passcode_timeout: $journals_slct.tmp_journal_obj.passcode_timeout,
|
||||
auth_key: $journals_slct.tmp_journal_obj.auth_key, // The Journal Entry encryption password
|
||||
|
||||
cfg_json: $journals_slct.tmp_journal_obj.cfg_json
|
||||
|
||||
@@ -198,6 +199,7 @@ async function handle_update_journal() {
|
||||
type_code: $lq__journal_obj?.type_code,
|
||||
passcode: $lq__journal_obj?.passcode,
|
||||
passcode_timeout: $lq__journal_obj?.passcode_timeout,
|
||||
auth_key: $lq__journal_obj?.auth_key,
|
||||
cfg_json: $lq__journal_obj?.cfg_json
|
||||
};
|
||||
$journals_sess.show__modal_edit__journal_obj = true;
|
||||
@@ -329,62 +331,93 @@ async function handle_update_journal() {
|
||||
class="top-center bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y"
|
||||
>
|
||||
<div class="modal">
|
||||
<div class="modal-box">
|
||||
<div class="modal-box mx-2 mb-10">
|
||||
<!-- <h3 class="font-bold text-lg">Edit Journal</h3> -->
|
||||
<div class="py-4">
|
||||
<div class="py-4 mb-2">
|
||||
<label class="text-sm text-gray-500 hidden sm:inline">
|
||||
Journal Name:
|
||||
<input type="text" placeholder="Journal Name" bind:value={$journals_slct.tmp_journal_obj.name} class="input input-bordered w-full mb-2" />
|
||||
</label>
|
||||
|
||||
<!-- Journal Description (Markdown) -->
|
||||
<label class="text-sm text-gray-500 hidden sm:inline">
|
||||
Journal Description:
|
||||
<textarea
|
||||
placeholder="Journal Description (Markdown format)"
|
||||
bind:value={$journals_slct.tmp_journal_obj.description}
|
||||
class="input input-bordered w-full mb-2 h-32 resize-none"
|
||||
title="Description of the journal (supports Markdown)"
|
||||
></textarea>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Journal Type" bind:value={$journals_slct.tmp_journal_obj.type_code} class="input input-bordered w-full mb-2" />
|
||||
|
||||
<!-- input for passcode -->
|
||||
<input type="text" placeholder="Passcode" bind:value={$journals_slct.tmp_journal_obj.passcode} class="input input-bordered w-full mb-2" />
|
||||
|
||||
<!-- input for passcode timeout -->
|
||||
<input type="number" placeholder="Passcode Timeout" bind:value={$journals_slct.tmp_journal_obj.passcode_timeout} class="input input-bordered w-full mb-2" />
|
||||
<div class="*:hover:inline">
|
||||
<!-- input for passcode -->
|
||||
<label
|
||||
class="text-sm text-gray-500">
|
||||
Passcode:
|
||||
<input type="text" placeholder="Passcode" bind:value={$journals_slct.tmp_journal_obj.passcode} class="input input-bordered w-64 mb-2" />
|
||||
</label>
|
||||
<div class="text-xs text-gray-500 hidden md:inline">
|
||||
<span class="text-red-500">*</span> This passcode is used to encrypt the Journal Entries.
|
||||
</div>
|
||||
|
||||
<!-- input for passcode timeout -->
|
||||
<label class="text-sm text-gray-500">
|
||||
Passcode Timeout:
|
||||
<input type="number" placeholder="Passcode Timeout" bind:value={$journals_slct.tmp_journal_obj.passcode_timeout} class="input input-bordered w-32 mb-2" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- input for auth_key -->
|
||||
<label class="text-sm text-gray-500 sm:inline">
|
||||
Auth Key:
|
||||
<input type="text" placeholder="Auth Key" bind:value={$journals_slct.tmp_journal_obj.auth_key} class="input input-bordered w-64 mb-2" />
|
||||
</label>
|
||||
|
||||
|
||||
<label class="text-sm text-gray-500">
|
||||
Journal Type:
|
||||
<input type="text" placeholder="Journal Type" bind:value={$journals_slct.tmp_journal_obj.type_code} class="input input-bordered w-48 mb-2" />
|
||||
</label>
|
||||
<!-- select option for journal type_code -->
|
||||
<span class="text-sm text-gray-500 hidden sm:inline">
|
||||
<div>
|
||||
<span class="text-sm text-gray-500 sm:inline">
|
||||
Journal Type:
|
||||
</span>
|
||||
<select
|
||||
class="btn btn-sm
|
||||
variant-ghost-surface
|
||||
hover:variant-filled-surface
|
||||
transition
|
||||
text-xs
|
||||
"
|
||||
bind:value={$journals_slct.tmp_journal_obj.type_code}
|
||||
onchange={(event) => {
|
||||
// Update the cfg_json with the selected journal type. Example cate
|
||||
$journals_slct.tmp_journal_obj.type_code = event.target.value;
|
||||
console.log('Selected journal type:', $journals_slct.tmp_journal_obj.type_code);
|
||||
}}
|
||||
title="Select a journal type"
|
||||
>
|
||||
<option value="">Select Journal Type</option>
|
||||
{#each $journals_loc.journal.type_code_li as journal_type}
|
||||
<option value={journal_type.code}>{journal_type.name}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<select
|
||||
class="btn btn-sm
|
||||
variant-ghost-surface
|
||||
hover:variant-filled-surface
|
||||
transition
|
||||
text-xs
|
||||
"
|
||||
bind:value={$journals_slct.tmp_journal_obj.type_code}
|
||||
onchange={(event) => {
|
||||
// Update the cfg_json with the selected journal type. Example cate
|
||||
$journals_slct.tmp_journal_obj.type_code = event.target.value;
|
||||
console.log('Selected journal type:', $journals_slct.tmp_journal_obj.type_code);
|
||||
}}
|
||||
title="Select a journal type"
|
||||
>
|
||||
<option value="">Select Journal Type</option>
|
||||
{#each $journals_loc.journal.type_code_li as journal_type}
|
||||
<option value={journal_type.code}>{journal_type.name}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- inputs for customizable journal category list -->
|
||||
<!-- each category has a code and name; need to be able to add and remove categories -->
|
||||
<span class="text-sm text-gray-500 hidden sm:inline">
|
||||
<div class="text-sm text-gray-500 hidden sm:inline">
|
||||
Journal Categories:
|
||||
</span>
|
||||
<div class="flex flex-col gap-1">
|
||||
</div>
|
||||
<div class="flex flex-col gap-1 p-4">
|
||||
{#each $journals_slct.tmp_journal_obj.cfg_json.category_li as category, index}
|
||||
<div class="flex flex-row items-center gap-1">
|
||||
<input type="text" placeholder="Category Code" bind:value={$journals_slct.tmp_journal_obj.cfg_json.category_li[index].code} class="input input-bordered w-full" />
|
||||
<input type="text" placeholder="Category Code" bind:value={$journals_slct.tmp_journal_obj.cfg_json.category_li[index].code} class="input input-bordered w-48" />
|
||||
<input type="text" placeholder="Category Name" bind:value={$journals_slct.tmp_journal_obj.cfg_json.category_li[index].name} class="input input-bordered w-full" />
|
||||
<button
|
||||
type="button"
|
||||
@@ -405,7 +438,7 @@ async function handle_update_journal() {
|
||||
$journals_slct.tmp_journal_obj.cfg_json.category_li.push({ code: '', name: '' });
|
||||
$journals_slct.tmp_journal_obj.cfg_json.category_li = $journals_slct.tmp_journal_obj.cfg_json.category_li;
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-success hover:variant-filled-success transition max-w-96"
|
||||
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition max-w-48 p-1"
|
||||
>
|
||||
<Plus />
|
||||
Add Category
|
||||
@@ -424,7 +457,7 @@ async function handle_update_journal() {
|
||||
$journals_slct.tmp_journal_obj.cfg_json.entry_li_max_height = event.target.value;
|
||||
console.log('Selected max height:', $journals_slct.tmp_journal_obj.cfg_json.entry_li_max_height);
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-96"
|
||||
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-48"
|
||||
title="Select maximum height for journal entries in the list"
|
||||
>
|
||||
<option value="">Default (auto)</option>
|
||||
@@ -451,7 +484,7 @@ async function handle_update_journal() {
|
||||
$journals_slct.tmp_journal_obj.cfg_json.color_scheme = event.target.value;
|
||||
console.log('Selected color scheme:', $journals_slct.tmp_journal_obj.cfg_json.color_scheme);
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-96"
|
||||
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-48"
|
||||
title="Select color scheme for journal entries"
|
||||
>
|
||||
<option value="">Default (auto)</option>
|
||||
|
||||
Reference in New Issue
Block a user