From 40574ba339b7fceea3fe389ad5bd5890584e5b39 Mon Sep 17 00:00:00 2001 From: beo3000 Date: Mon, 23 Feb 2026 17:21:26 +0100 Subject: [PATCH] ui --- .../src/lib/components/TopicCard.svelte | 47 +++++++++++++++++-- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/ka-note/client/src/lib/components/TopicCard.svelte b/ka-note/client/src/lib/components/TopicCard.svelte index 21b1043..f0f8782 100644 --- a/ka-note/client/src/lib/components/TopicCard.svelte +++ b/ka-note/client/src/lib/components/TopicCard.svelte @@ -45,6 +45,9 @@ let confirmDeleteTopic = $state(false); let editingTitle = $state(false); let titleInput = $state(""); + let showSnoozeDialog = $state(false); + let snoozeDate = $state(""); + let snoozeDateText = $state(""); // Sync collapsed state with global store $effect(() => { @@ -84,11 +87,18 @@ } function handleSnooze() { - const dateInput = prompt("Datum (YYYY-MM-DD):", "2026-06-01"); - if (!dateInput) return; + snoozeDate = ""; + snoozeDateText = ""; + showSnoozeDialog = true; + } + + function commitSnooze() { + const date = snoozeDate || snoozeDateText.trim(); + if (!date) return; saveNote(); - updateTopic(topic.id, { snoozeUntil: dateInput, status: "snoozed", isNew: false }); + updateTopic(topic.id, { snoozeUntil: date, status: "snoozed", isNew: false }); processedTopicIds.add(topic.id); + showSnoozeDialog = false; } function handleDone() { @@ -271,6 +281,37 @@ {/if} + {#if showSnoozeDialog} +
+
Verschieben auf
+
+ (snoozeDateText = "")} + /> + oder + (snoozeDate = "")} + onkeydown={(e) => e.key === 'Enter' && commitSnooze()} + /> + + +
+
+ {/if} + {#if $history?.some((h) => h.text !== 'Thema angelegt.')}