Adding more config options. Making things look better.

This commit is contained in:
Scott Idem
2025-05-15 15:07:37 -04:00
parent 72fb34e3f1
commit 53856a913b
7 changed files with 407 additions and 187 deletions

View File

@@ -8,7 +8,7 @@ import { goto } from '$app/navigation';
import {
ArrowDown01, ArrowDown10, ArrowDownUp,
BookHeart, BookImage, Bookmark, BookOpenText, BriefcaseBusiness,
Check,
Check, Copy,
Eye, EyeOff,
Flag, FlagOff, FilePlus, Fingerprint,
Globe,
@@ -386,7 +386,7 @@ async function handle_update_journal() {
<div class="modal">
<div class="modal-box mx-2 mb-14 space-y-4">
<!-- <h3 class="font-bold text-lg">Edit Journal</h3> -->
<div class="py-2 mb-2">
<div class="space-y-2 py-2 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" />
@@ -459,7 +459,7 @@ async function handle_update_journal() {
</select>
</div>
<div class="flex flex-row gap-1 items-center judify-start">
<div class="flex flex-row gap-1 items-center justify-start">
<!-- inputs for customizable journal category list -->
<!-- each category has a code and name; need to be able to add and remove categories -->
<div class="text-sm text-gray-500 hidden sm:inline">
@@ -498,7 +498,7 @@ async function handle_update_journal() {
</div>
<!-- Select max height options (Tailwind CSS) -->
<div class="flex flex-row gap-1 items-center judify-start">
<div class="flex flex-row gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Journal Entry List Max Height:
</span>
@@ -523,7 +523,7 @@ async function handle_update_journal() {
</div>
<!-- Select hover max height options (Tailwind CSS) -->
<div class="flex flex-row gap-1 items-center judify-start">
<div class="flex flex-row gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Journal Entry List Hover Max Height:
</span>
@@ -550,7 +550,7 @@ async function handle_update_journal() {
<!-- Select color scheme for the journal entries -->
<!-- Should select from the common Tailwind CSS options. Examples: slate, blue, gray, green, orange, red, yellow, etc. -->
<!-- Saves to cfg_json.color_scheme -->
<div class="flex flex-row gap-1 items-center judify-start">
<div class="flex flex-row gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Color Scheme:
</span>
@@ -574,14 +574,206 @@ async function handle_update_journal() {
</select>
</div>
<div class="flex flex-row gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Preferred Viewer:
</span>
<select
bind:value={$journals_slct.tmp_journal_obj.cfg_json.pref_viewer}
onchange={(event) => {
$journals_slct.tmp_journal_obj.cfg_json.pref_viewer = event.target.value;
console.log('Selected viewer:', $journals_slct.tmp_journal_obj.cfg_json.pref_viewer);
}}
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-48"
title="Select preferred viewer for journal entries"
>
<option value="">Default (Rendered)</option>
<option value="plain">Plain Text</option>
<option value="rendered">Rendered (HTML)</option>
<!-- <option value="textarea">Text Area</option> -->
<option value="codemirror">CodeMirror (readonly)</option>
</select>
</div>
<div class="flex flex-row gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Preferred Editor:
</span>
<select
bind:value={$journals_slct.tmp_journal_obj.cfg_json.pref_editor}
onchange={(event) => {
$journals_slct.tmp_journal_obj.cfg_json.pref_editor = event.target.value;
console.log('Selected editor:', $journals_slct.tmp_journal_obj.cfg_json.pref_editor);
}}
class="btn btn-sm variant-ghost-surface hover:variant-filled-surface transition text-xs w-full mb-2 max-w-48"
title="Select preferred editor for journal entries"
>
<option value="">Default (Text Area)</option>
<option value="textarea">Text Area</option>
<option value="codemirror">CodeMirror</option>
</select>
</div>
<!-- Toggles for the copy content buttons: plain text (in Markdown), HTML marked up, rendered rich HTML, encrypted content, clone Entry -->
<div class="flex flex-row flex-wrap gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Journal Entry Copy Options:
</span>
<span class="flex flex-row flex-wrap gap-1 items-center justify-center">
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_copy_plain_md = !$journals_slct.tmp_journal_obj.cfg_json.hide_copy_plain_md;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of Markdown copy button(s) on Journal Entry view page"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_copy_plain_md}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<EyeOff 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" />
<Eye strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Plaintext Markdown Copy Button
</span>
</button>
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_copy_html = !$journals_slct.tmp_journal_obj.cfg_json.hide_copy_html;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of HTML copy button(s) on Journal Entry view page"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_copy_html}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<EyeOff 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" />
<Eye strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
HTML Copy Button
</span>
</button>
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_copy_rich = !$journals_slct.tmp_journal_obj.cfg_json.hide_copy_rich;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of rendered copy button(s) on Journal Entry view page"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_copy_rich}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<EyeOff 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" />
<Eye strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Rendered Rich Copy Button
</span>
</button>
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_copy_encrypted = !$journals_slct.tmp_journal_obj.cfg_json.hide_copy_encrypted;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of encrypted copy button(s) on Journal Entry view page"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_copy_encrypted}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<EyeOff 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" />
<Eye strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Encrypted Copy Button
</span>
</button>
<button
type="button"
onclick={() => {
$journals_slct.tmp_journal_obj.cfg_json.hide_clone = !$journals_slct.tmp_journal_obj.cfg_json.hide_clone;
}}
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition *:hover:inline"
title="Toggle visibility of clone button(s) on Journal Entry view page"
>
{#if $journals_slct.tmp_journal_obj.cfg_json.hide_clone}
<!-- <EyeOff strokeWidth="1" color="red" /> -->
<ToggleLeft strokeWidth="1" color="red" class="mx-1" />
<Copy 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" />
<Copy strokeWidth="2.5" color="green" />
<span class="hidden">
Showing
</span>
{/if}
<span class="hidden">
Clone Button
</span>
</button>
</span>
</div>
<!-- Toggles for automatically hiding Entries marked as either: private, personal, or professional -->
<div class="flex flex-row gap-1 items-center judify-start">
<div class="flex flex-row flex-wrap gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Journal Entry Visibility:
</span>
<span class="flex flex-row gap-1 items-center justify-center">
<span class="flex flex-row flex-wrap gap-1 items-center justify-center">
<button
type="button"
onclick={() => {
@@ -670,13 +862,13 @@ async function handle_update_journal() {
<!-- Toggle buttons for showing/hiding various Journal Entry page view buttons: alert, alert message, private, public, personal, professional, template -->
<div class="flex flox-row gap-1 items-center judify-start">
<div class="flex flox-row flex-wrap gap-1 items-center justify-start">
<span class="text-sm text-gray-500 hidden sm:inline">
Journal Entry View Buttons:
</span>
<span class="flex flex-row gap-1 items-center justify-center">
<span class="flex flex-row flex-wrap gap-1 items-center justify-center">
<button
type="button"
onclick={() => {

View File

@@ -187,6 +187,7 @@ if (browser) {
{#if $lq__journal_entry_obj_li && $lq__journal_entry_obj_li?.length }
<Journal_entry_obj_li
lq__journal_obj={lq__journal_obj}
lq__journal_entry_obj_li={lq__journal_entry_obj_li}
/>
{:else}