Task fully working except collaborative to handoff switching handling
This commit is contained in:
@@ -14,6 +14,7 @@ import { NotesSidebar } from "@/components/NotesSidebar";
|
||||
import { toast } from "solid-sonner";
|
||||
import { TextBubbleMenu } from "@/components/TextBubbleMenu";
|
||||
import { TableBubbleMenu } from "@/components/TableBubbleMenu";
|
||||
import { normalizeNoteKey } from "@/lib/tags";
|
||||
|
||||
export const NotepadView: Component<{
|
||||
selectedNoteId: string | null;
|
||||
@@ -229,12 +230,15 @@ export const NotepadView: Component<{
|
||||
if (!root || !userId) return;
|
||||
|
||||
try {
|
||||
const keyBase = normalizeNoteKey(`${root.key || root.title}-tab`);
|
||||
const result = await pb.collection(NOTES_COLLECTION).create({
|
||||
title: "New Tab",
|
||||
key: `${keyBase}-${Date.now()}`,
|
||||
content: "",
|
||||
tags: [`child-of-${root.id}`],
|
||||
isPrivate: root.isPrivate, // inherit privacy
|
||||
user: userId,
|
||||
tasks: []
|
||||
});
|
||||
props.setSelectedNoteId(result.id);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user