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.')}