Journals is working pretty well. Most basic functions work now.

This commit is contained in:
Scott Idem
2025-03-21 17:08:58 -04:00
parent 8826ebf92f
commit db762a3c91
5 changed files with 528 additions and 490 deletions

View File

@@ -4,7 +4,7 @@ let log_lvl: number = 1;
// *** Import Svelte specific
import { goto, invalidate, pushState, replaceState } from '$app/navigation';
import { CalendarClock, NotebookPen, NotebookText, Shapes, Tags } from '@lucide/svelte';
import { CalendarClock, Flag, FlagOff, NotebookPen, NotebookText, Shapes, Siren, Tags } from '@lucide/svelte';
// *** Import Aether specific variables and functions
@@ -48,11 +48,17 @@ let ae_promises: key_val = $state({});
<header class="ae_header flex flex-row gap-2 items-center justify-between w-full">
<h3 class="journal__name h4">
<span class="journal_entry__name">
{#if (journals_journal_entry_obj.alert)}
<Siren class="mx-1 inline-block text-red-500"/>
{/if}
{#if (journals_journal_entry_obj.priority)}
<Flag class="mx-1 inline-block text-yellow-500"/>
{/if}
{#if (journals_journal_entry_obj.name)}
<NotebookText class="m-1 inline-block"/>
<NotebookText class="mx-1 inline-block"/>
{@html journals_journal_entry_obj.name}
{:else}
<CalendarClock class="m-1 inline-block"/>
<CalendarClock class="mx-1 inline-block"/>
{ae_util.iso_datetime_formatter(journals_journal_entry_obj.created_on, 'datetime_iso_12_no_seconds')}
{/if}
</span>
@@ -62,12 +68,12 @@ let ae_promises: key_val = $state({});
<!-- Tags for journal entry. Comma delimited list. -->
{#if journals_journal_entry_obj.tags && journals_journal_entry_obj.tags.length}
<div class="tags flex flex-wrap gap-1 items-center justify-start p-1">
<Tags class="m-1 inline-block"/>
<Tags class="mx-1 inline-block"/>
<span class="text-sm text-gray-500 hidden md:inline">Tags:</span>
{#each journals_journal_entry_obj.tags.split(',') as tag}
<span
class="btn btn-sm variant-outline-tertiary hover:variant-ghost-tertiary transition py-1 px-2"
class="btn btn-sm variant-glass-tertiary hover:variant-ghost-tertiary transition py-1 px-2"
title={`Tag: ${tag.trim()}`}
>
{tag.trim()}
@@ -97,7 +103,7 @@ let ae_promises: key_val = $state({});
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary transition py-1 px-2"
title={`Filter by category: ${journals_journal_entry_obj.category_code}`}
>
<Shapes class="m-1 inline-block"/>
<Shapes class="mx-1 inline-block"/>
{journals_journal_entry_obj.category_code ?? '-- no category --'}
</button>
{/if}
@@ -107,7 +113,7 @@ let ae_promises: key_val = $state({});
class="btn btn-secondary variant-ghost-primary hover:variant-filled-primary transition"
title={`View ID: ${journals_journal_entry_obj?.id}\n${journals_journal_entry_obj?.name ?? ae_util.iso_datetime_formatter(journals_journal_entry_obj.created_on, 'datetime_iso_12_no_seconds')}`}
>
<NotebookPen class="m-1 inline-block"/>
<NotebookPen class="mx-1 inline-block"/>
<span class="hidden md:inline">
View
</span>