From d1286cd71792736efb8d7cad6655f8d70435b9d8 Mon Sep 17 00:00:00 2001 From: beo3000 Date: Wed, 25 Feb 2026 08:10:54 +0100 Subject: [PATCH] ui fixes --- ka-note/VERSION | 2 +- .../src/lib/components/HistoryItem.svelte | 26 ++- .../src/lib/components/JournalView.svelte | 39 +++- .../src/lib/components/TopicCard.svelte | 6 +- ka-note/client/src/lib/stores/wiki.ts | 42 +++- ka-note/client/src/lib/utils/titleUtils.ts | 2 +- ka-note/client/src/routes/wiki/+page.svelte | 220 +++++++++++------- 7 files changed, 244 insertions(+), 93 deletions(-) diff --git a/ka-note/VERSION b/ka-note/VERSION index 2442528..bf29cfe 100644 --- a/ka-note/VERSION +++ b/ka-note/VERSION @@ -1 +1 @@ -1.1.62 \ No newline at end of file +1.1.68 \ No newline at end of file diff --git a/ka-note/client/src/lib/components/HistoryItem.svelte b/ka-note/client/src/lib/components/HistoryItem.svelte index 35facb9..b6e3915 100644 --- a/ka-note/client/src/lib/components/HistoryItem.svelte +++ b/ka-note/client/src/lib/components/HistoryItem.svelte @@ -6,8 +6,9 @@ interface Props { entry: HistoryEntry; onedit?: (id: string, text: string, date: string) => void; + onediting?: (active: boolean) => void; } - let { entry, onedit }: Props = $props(); + let { entry, onedit, onediting }: Props = $props(); let editing = $state(false); let editText = $state(''); @@ -17,15 +18,18 @@ editText = entry.text; editDate = entry.date; editing = true; + onediting?.(true); } function saveEdit() { onedit?.(entry.id, editText, editDate); editing = false; + onediting?.(false); } function cancelEdit() { editing = false; + onediting?.(false); } @@ -44,7 +48,20 @@ {#if editing} -
+ +
{ if (e.key === 'Escape') cancelEdit(); }}> +
+ +
+ + +
+
{:else} - + +
+ +
{/if}
{/if} diff --git a/ka-note/client/src/lib/components/JournalView.svelte b/ka-note/client/src/lib/components/JournalView.svelte index 8c5c995..8091ba8 100644 --- a/ka-note/client/src/lib/components/JournalView.svelte +++ b/ka-note/client/src/lib/components/JournalView.svelte @@ -236,7 +236,7 @@ {/if} -
+
{selectedDate}
{#each filteredEntries as entry (entry.id)} {#if editingId === entry.id} -
- +
{ if (e.key === 'Escape') cancelEdit(); }}> +
+ + + +
+ + +
+
+ { if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) { e.preventDefault(); saveEdit(); } }} /> editBody = md} + onsave={saveEdit} />