diff --git a/src/views/NotepadView.tsx b/src/views/NotepadView.tsx index cdd431b..2c10586 100644 --- a/src/views/NotepadView.tsx +++ b/src/views/NotepadView.tsx @@ -2,7 +2,7 @@ import { type Component, createSignal, createMemo, For, Show } from "solid-js"; import { store, renameTagDefinition } from "@/store"; import { pb } from "@/lib/pocketbase"; import { type Note } from "@/store"; -import { Trash2, Lock, Unlock, Search, Link, X } from "lucide-solid"; +import { Trash2, Lock, Unlock, Search, Link, X, ChevronRight } from "lucide-solid"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { TaskEditor } from "@/components/TaskEditor"; @@ -17,6 +17,7 @@ export const NotepadView: Component<{ }> = (props) => { const [isLinking, setIsLinking] = createSignal(false); const [linkSearchQuery, setLinkSearchQuery] = createSignal(""); + const [isLinkedTasksOpen, setIsLinkedTasksOpen] = createSignal(true); const currentUserId = pb.authStore.model?.id; @@ -173,15 +174,7 @@ export const NotepadView: Component<{ return ( <> {/* Editor Area */} -
- {/* Mobile Back Button */} - -
- -
-
+
{/* Editor Instance */} -
+
handleUpdateContent(note().id, html)} editable={canEdit} />
+ + {/* Close button (Mobile only) */} + +
+ +
+
{/* Linked Tasks Sidebar */} -
-
-
-

- - Linked Tasks -

-
- - +
{ + if (!isLinkedTasksOpen()) { + setIsLinkedTasksOpen(true); + } + }}> +
+
{ + e.stopPropagation(); + setIsLinkedTasksOpen(!isLinkedTasksOpen()); + }} + > +
+ +
+ }> +

+ + Linked Tasks +

+ + +
+ + Linked Tasks +
+
+ +
+ + +
+
- +
@@ -292,34 +338,36 @@ export const NotepadView: Component<{
-
- - -

No tasks linked yet.

-

Link an existing task, create a new one, or add the tag #{note().title} to a task.

-
- }> - {(task) => ( -
- - {/* If explicitly linked, allow unlinking. If linked by tag, they should remove the tag from the task, which we can't easily do here unless we implement it. */} - - - + +
+ + +

No tasks linked yet.

+

Link an existing task, create a new one, or add the tag #{note().title} to a task.

- )} - -
+ }> + {(task) => ( +
+ + {/* If explicitly linked, allow unlinking. If linked by tag, they should remove the tag from the task, which we can't easily do here unless we implement it. */} + + + +
+ )} + +
+
);