A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
Merge branch 'move-pins-out'
Abdullah Atta6c613c6f1ede
diff --cc apps/web/src/components/navigation-menu/index.tsxindex 5b8fa760d,6ff0df88e..359480f13--- a/apps/web/src/components/navigation-menu/index.tsx+++ b/apps/web/src/components/navigation-menu/index.tsx@@@ -203,25 -188,28 +203,25 @@@ function NavigationMenu(props: Navigatimy={1}sx={{ width: "85%", height: "0.8px", alignSelf: "center" }}/>- {pins.map((pin) => (+ {shortcuts.map((item) => (<NavigationItemisTablet={isTablet}- key={pin.id}- title={pin.type === "tag" ? db.tags?.alias(pin.id) : pin.title}+ key={item.id}- title={item.type === "tag" ? db.tags.alias(item.id) : item.title}- menu={{- items: [- {- key: "removeshortcut",- title: () => "Remove shortcut",- onClick: async ({ item }) => {- await db.shortcuts.remove(item.id);- refreshNavItems();- }++ title={item.type === "tag" ? db.tags?.alias(item.id) : item.title}+ menuItems={[+ {- key: "remove-shortcut",++ key: "removeshortcut",+ title: () => "Remove shortcut",- onClick: async () => {- await db.settings?.unpin(pin.id);++ onClick: async ({ item }: { item: { id: string } }) => {++ await db.shortcuts?.remove(item.id);+ refreshNavItems();}- ],- extraData: { item }- }}+ }+ ]}icon={- pin.type === "notebook"+ item.type === "notebook"? Notebook2- : pin.type === "tag"+ : item.type === "tag"? Tag2: Topic}diff --cc packages/core/collections/notebooks.jsindex effcc797f,1e00465c9..19b95dc38--- a/packages/core/collections/notebooks.js+++ b/packages/core/collections/notebooks.js@@@ -146,9 -163,9 +146,9 @@@ export default class Notebooks extendslet notebook = this.notebook(id);if (!notebook) continue;const notebookData = qclone(notebook.data);- await notebook.topics.delete(...notebook.data.topics);+ // await notebook.topics.delete(...notebook.data.topics);await this._collection.removeItem(id);- await this._db.settings.unpin(id);+ await this._db.shortcuts.remove(id);await this._db.trash.add(notebookData);}}diff --cc packages/core/collections/topics.jsindex 006389e4e,2fd372c32..00e59eeca--- a/packages/core/collections/topics.js+++ b/packages/core/collections/topics.js@@@ -116,8 -116,8 +116,8 @@@ export default class Topicsconst topic = this.topic(topicId);if (!topic) continue;- await topic.delete(...topic._topic.notes);+ await topic.clear();- await this._db.settings.unpin(topicId);+ await this._db.shortcuts.remove(topicId);const topicIndex = allTopics.findIndex((t) => t.id === topicId || t.title === topicId