diff --git a/.npmrc b/.npmrc index 361b1968..525238b9 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,4 @@ registry=https://registry.npmjs.org/ link-workspace-packages=true +@tiptap-pro:registry=https://registry.tiptap.dev/ +//registry.tiptap.dev/:_authToken=${TIPTAP_TOKEN} \ No newline at end of file diff --git a/apps/web/.npmrc b/apps/web/.npmrc new file mode 100644 index 00000000..e69de29b diff --git a/apps/web/app/(dash)/(memories)/content.tsx b/apps/web/app/(dash)/(memories)/content.tsx index 0f83d0fc..9dba3637 100644 --- a/apps/web/app/(dash)/(memories)/content.tsx +++ b/apps/web/app/(dash)/(memories)/content.tsx @@ -304,7 +304,13 @@ function SpaceComponent({ href={`/space/${id}`} className="flex items-center justify-between w-full" > -
+
+
+ {title.slice(0, 2).toUpperCase()} + {id} +
+
+
{title}
{description}
@@ -312,7 +318,7 @@ function SpaceComponent({ Search icon
-
+
{ handleDeleteSpace(id); diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx index abac5411..45cfc599 100644 --- a/apps/web/app/(dash)/menu.tsx +++ b/apps/web/app/(dash)/menu.tsx @@ -11,6 +11,7 @@ import { } from "@repo/ui/icons"; import { Button } from "@repo/ui/shadcn/button"; import { MinusIcon, PlusCircleIcon } from "lucide-react"; +import Editor from "@/components/editor/advanced-editor"; import { Dialog, DialogContent, @@ -58,20 +59,16 @@ function Menu() { }, ]; - - const [dialogOpen, setDialogOpen] = useState(false); return ( - <> +
{/* Desktop Menu */}
- + Logo
- setDialogOpen(false)} /> + setDialogOpen(false)} /> {/* Mobile Menu */}
@@ -154,12 +151,11 @@ function Menu() {
- +
); } -function DialogContentMenu({setDialogClose}: {setDialogClose: ()=> void}){ - +function DialogContentMenu({ setDialogClose }: { setDialogClose: () => void }) { const [spaces, setSpaces] = useState([]); useEffect(() => { @@ -221,7 +217,7 @@ function DialogContentMenu({setDialogClose}: {setDialogClose: ()=> void}){ setContent(""); setSelectedSpaces([]); return cont; - } + }; const formSubmit = () => { toast.promise(handleSubmit(content, selectedSpaces), { @@ -236,89 +232,114 @@ function DialogContentMenu({setDialogClose}: {setDialogClose: ()=> void}){ richColors: true, }); }; + + const [editorOpen, setEditorOpen] = useState(false); return ( -
- + + Add memory -
- - ({ - label: x.name, - value: x.id.toString(), - }))} - onSelect={(v) => - setSelectedSpaces((prev) => { - if (v === "") { - return []; - } - return [...prev, parseInt(v)]; - }) +
+ + ({ + label: x.name, + value: x.id.toString(), + }))} + onSelect={(v) => + setSelectedSpaces((prev) => { + if (v === "") { + return []; } - onSubmit={async (spaceName) => { - const space = options.find((x) => x.label === spaceName); - toast.info("Creating space..."); + return [...prev, parseInt(v)]; + }) + } + onSubmit={async (spaceName) => { + const space = options.find((x) => x.label === spaceName); + toast.info("Creating space..."); - if (space) { - toast.error("A space with that name already exists."); - } + if (space) { + toast.error("A space with that name already exists."); + } - const creationTask = await createSpace(spaceName); - if (creationTask.success && creationTask.data) { - toast.success("Space created " + creationTask.data); - setSpaces((prev) => [ - ...prev, - { - name: spaceName, - id: creationTask.data!, - createdAt: new Date(), - user: null, - numItems: 0, - }, - ]); - setSelectedSpaces((prev) => [...prev, creationTask.data!]); - } else { - toast.error("Space creation failed: " + creationTask.error); - } - }} - /> -
+ const creationTask = await createSpace(spaceName); + if (creationTask.success && creationTask.data) { + toast.success("Space created " + creationTask.data); + setSpaces((prev) => [ + ...prev, + { + name: spaceName, + id: creationTask.data!, + createdAt: new Date(), + user: null, + numItems: 0, + }, + ]); + setSelectedSpaces((prev) => [...prev, creationTask.data!]); + } else { + toast.error("Space creation failed: " + creationTask.error); + } + }} + /> +
-
- -