Work on hiding certain entries by default. Ability to append to an entry.

This commit is contained in:
Scott Idem
2025-04-14 18:33:59 -04:00
parent 2133fa520e
commit 3a47b77641
3 changed files with 354 additions and 18 deletions

View File

@@ -7,16 +7,18 @@ let { data, children } = $props();
import { goto } from '$app/navigation';
import {
ArrowDown01, ArrowDown10, ArrowDownUp,
BookHeart, BookImage, Bookmark, BookOpenText,
BookHeart, BookImage, Bookmark, BookOpenText, BriefcaseBusiness,
Check,
Eye, EyeOff,
Flag, FlagOff, FilePlus, Library,
Flag, FlagOff, FilePlus, Fingerprint,
Globe,
Library,
MessageSquareWarning, Minus,
Notebook,
Pencil, Plus,
SquareLibrary,
Shapes, Share2, ShieldCheck, ShieldMinus, Siren, Skull,
Tags, Trash2, TypeOutline,
Tags, ToggleLeft, ToggleRight, Trash2, TypeOutline,
X
} from '@lucide/svelte';
@@ -314,6 +316,8 @@ async function handle_update_journal() {
</section>
<!-- Modal for editing journal -->
{#if $journals_sess.show__modal_edit__journal_obj}
<Modal
@@ -415,13 +419,13 @@ async function handle_update_journal() {
Journal Entry List Max Height:
</span>
<select
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-96"
bind:value={$journals_slct.tmp_journal_obj.cfg_json.entry_li_max_height}
title="Select maximum height for journal entries in the list"
onchange={(event) => {
$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"
title="Select maximum height for journal entries in the list"
>
<option value="">Default (auto)</option>
<!-- <option value="none">None (no limit)</option> -->
@@ -442,13 +446,13 @@ async function handle_update_journal() {
Color Scheme:
</span>
<select
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-96"
bind:value={$journals_slct.tmp_journal_obj.cfg_json.color_scheme}
title="Select color scheme for journal entries"
onchange={(event) => {
$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"
title="Select color scheme for journal entries"
>
<option value="">Default (auto)</option>
<option value="slate">Slate</option>
@@ -461,6 +465,92 @@ async function handle_update_journal() {
</select>
</div>
<!-- Toggles for automatically hiding Entries marked as either: private, personal, or professional -->
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_private = !$journals_slct.tmp_journal_obj.cfg_json.hide_private;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of private entries"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_private}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<Fingerprint strokeWidth="1" color="gray" class="mx-1" />
<span class="hidden">
Hiding
</span>
{:else}
<!-- <Eye strokeWidth="2.5" color="green" /> -->
<ToggleRight strokeWidth="2.5" color="green" class="mx-1" />
<Fingerprint strokeWidth="2.5" color="green" class="mx-1" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Private Entries
</span>
</button>
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_personal = !$journals_slct.tmp_journal_obj.cfg_json.hide_personal;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of personal entries"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_personal}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<BookHeart strokeWidth="1" color="gray" />
<span class="hidden">
Hiding
</span>
{:else}
<!-- <Eye strokeWidth="2.5" color="green" /> -->
<ToggleRight strokeWidth="2.5" color="green" class="mx-1" />
<BookHeart strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Personal Entries
</span>
</button>
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_professional = !$journals_slct.tmp_journal_obj.cfg_json.hide_professional;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of professional entries"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_professional}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<BriefcaseBusiness strokeWidth="1" color="gray" />
<span class="hidden">
Hiding
</span>
{:else}
<!-- <Eye strokeWidth="2.5" color="green" /> -->
<ToggleRight strokeWidth="2.5" color="green" class="mx-1" />
<BriefcaseBusiness strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Professional Entries
</span>
</button>
<!-- JSON configuration editor for advanced users -->
<!-- textarea for json_cfg editing -->
</div>

View File

@@ -156,7 +156,7 @@ let lq__journal_entry_obj = $derived(liveQuery(async () => {
{/if}
<span class="text-sm text-gray-500">
Edit Journal:
Edit Journal Entry:
</span>
{$lq__journal_entry_obj?.name}
</h3>