Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: impl add to notebook in properties

thecodrr777c37a6cf0d
diff --git a/apps/web/src/components/properties/index.js b/apps/web/src/components/properties/index.js
index 1118eda22..dd98904e5 100644
--- a/apps/web/src/components/properties/index.js
+++ b/apps/web/src/components/properties/index.js
@@ -9,6 +9,7 @@ import { useStore as useAppStore } from "../../stores/app-store";
import Animated from "../animated";
import Toggle from "./toggle";
import { toTitleCase } from "../../utils/string";
+import { showMoveNoteDialog } from "../dialogs/movenotedialog";
const tools = [
{ key: "pinned", icons: { on: Icon.PinFilled, off: Icon.Pin }, label: "Pin" },
@@ -24,6 +25,7 @@ function Properties() {
const colors = useStore((store) => store.session.colors);
const toggleLocked = useStore((store) => store.toggleLocked);
const tags = useStore((store) => store.session.tags);
+ const sessionId = useStore((store) => store.session.id);
const setSession = useStore((store) => store.setSession);
const setColor = useStore((store) => store.setColor);
const setTag = useStore((store) => store.setTag);
@@ -104,7 +106,12 @@ function Properties() {
/>
))}
</Flex>
- <Button color="static">Add to notebook</Button>
+ <Button
+ color="static"
+ onClick={() => showMoveNoteDialog([sessionId])}
+ >
+ Add to notebook
+ </Button>
<Flex flexDirection="column">
{objectMap(COLORS, (label, code) => (
<Flex