web: nuke Remove from topic menu item

This commit is contained in:
Abdullah Atta
2023-03-17 14:41:54 +05:00
committed by Abdullah Atta
parent da47ef159b
commit 12e6688f48

View File

@@ -463,32 +463,6 @@ const menuItems = [
} }
}, },
{ key: "sep3", type: "separator" }, { key: "sep3", type: "separator" },
{
key: "removefromtopic",
title: "Remove from topic",
icon: Icon.TopicRemove,
hidden: ({ context }) => context?.type !== "topic",
onClick: async ({ items, context }) => {
try {
if (!context.value?.topic || !context.value?.id)
throw new Error("context is missing");
const ids = items.map((i) => i.id);
await db.notes.removeFromNotebook(
{ id: context.value.id, topic: context.value.topic },
...ids
);
store.refresh();
showToast("success", "Note removed from topic.");
} catch (e) {
showToast("error", `Failed to remove note from topic: ${e.message}.`);
}
},
multiSelect: true
},
{ {
key: "movetotrash", key: "movetotrash",
title: "Move to trash", title: "Move to trash",