Lots of work with linking files to Journal Entries.

This commit is contained in:
Scott Idem
2025-05-20 15:37:27 -04:00
parent 83a8377155
commit 15d417ba52
6 changed files with 517 additions and 196 deletions

View File

@@ -7,7 +7,7 @@ import { Modal } from 'flowbite-svelte';
import {
CalendarClock, Check, CodeXml, Copy,
Eye, EyeOff,
FileLock, Fingerprint, Flag, FlagOff,
FileLock, Files, Fingerprint, Flag, FlagOff,
Group,
ListPlus, Lock,
NotebookPen, NotebookText, NotepadTextDashed,
@@ -343,12 +343,28 @@ $effect(() => {
</span>
<div class="flex flex-row flex-wrap gap-2 items-center justify-end">
<!-- Linked file count -->
<div
class="ae_linked_file_count flex flex-row flex-wrap gap-0.5 items-center justify-start"
class:hidden={!journals_journal_entry_obj?.data_json?.hosted_file_kv}
>
<Files class="mx-1 inline-block" />
<span class="text-xs text-gray-500 hidden md:inline">Linked files:</span>
<span class="font-semibold text-sm text-gray-500">
{journals_journal_entry_obj?.data_json?.hosted_file_kv
? Object.keys(journals_journal_entry_obj?.data_json?.hosted_file_kv).length
: 0}&times;
</span>
</div>
<!-- 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">
<div class="tags flex flex-row flex-wrap gap-0.5 items-center justify-start p-1">
<Tags class="mx-1 inline-block"/>
<span class="text-sm text-gray-500 hidden md:inline">Tags:</span>
<span class="text-xs text-gray-500 hidden md:inline">Tags:</span>
{#each journals_journal_entry_obj.tags.split(',') as tag}
<span