From 3cbbc65c5cfa38118ab6a927cf97c30b6f163911 Mon Sep 17 00:00:00 2001 From: Timothy Cardoza Date: Fri, 13 Mar 2026 11:50:15 -0500 Subject: [PATCH] note vs tab deletion clarity --- src/views/NotepadView.tsx | 90 ++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 20 deletions(-) diff --git a/src/views/NotepadView.tsx b/src/views/NotepadView.tsx index 13dbed1..3180b4a 100644 --- a/src/views/NotepadView.tsx +++ b/src/views/NotepadView.tsx @@ -23,6 +23,8 @@ export const NotepadView: Component<{ const [isLinkedTasksOpen, setIsLinkedTasksOpen] = createSignal(false); const [isDragging, setIsDragging] = createSignal(false); const [editorInstance, setEditorInstance] = createSignal(null); + const [noteActionsOpen, setNoteActionsOpen] = createSignal(false); + const [confirmDeleteOpen, setConfirmDeleteOpen] = createSignal(false); const currentUserId = pb.authStore.model?.id; @@ -332,13 +334,16 @@ export const NotepadView: Component<{ const isOwner = note().user === currentUserId; const canEdit = isOwner || !note().isPrivate; - const hasTopViewer = createMemo(() => { - const c = note()?.content; - if (!c) return false; - const s = c.trim(); - return s.startsWith('
{ + const c = note()?.content; + if (!c) return false; + const s = c.trim(); + return s.startsWith('
{ + return (note()?.tags || []).some(t => t.startsWith("child-of-")); + }); return ( <> @@ -707,11 +712,17 @@ export const NotepadView: Component<{
{/* Sticky Footer Actions (Match TaskDetail style) */} -
+
{/* "..." popover menu containing Public/Private toggle and Delete */} - + { + setNoteActionsOpen(nextOpen); + if (!nextOpen) setConfirmDeleteOpen(false); + }} + > Private - + +
+
+ } > - - Delete - + +