Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(popup_editor): integrate with tree context menu
Elian Doran1fc860b0522b
diff --git a/apps/client/src/components/app_context.ts b/apps/client/src/components/app_context.tsindex ffff952d1b..0c155c1e84 100644--- a/apps/client/src/components/app_context.ts+++ b/apps/client/src/components/app_context.ts@@ -126,7 +126,6 @@ export type CommandMappings = {openNoteInNewTab: CommandData;openNoteInNewSplit: CommandData;openNoteInNewWindow: CommandData;- openNoteInPopup: CommandData;openAboutDialog: CommandData;hideFloatingButtons: {};hideLeftPane: CommandData;@@ -142,6 +141,7 @@ export type CommandMappings = {};openInTab: ContextMenuCommandData;openNoteInSplit: ContextMenuCommandData;+ openNoteInPopup: ContextMenuCommandData;toggleNoteHoisting: ContextMenuCommandData;insertNoteAfter: ContextMenuCommandData;insertChildNote: ContextMenuCommandData;diff --git a/apps/client/src/menus/tree_context_menu.ts b/apps/client/src/menus/tree_context_menu.tsindex 4891111ea9..1b9383442f 100644--- a/apps/client/src/menus/tree_context_menu.ts+++ b/apps/client/src/menus/tree_context_menu.ts@@ -70,8 +70,8 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Treeconst items: (MenuItem<TreeCommandNames> | null)[] = [{ title: `${t("tree-context-menu.open-in-a-new-tab")}`, command: "openInTab", uiIcon: "bx bx-link-external", enabled: noSelectedNotes },-{ title: t("tree-context-menu.open-in-a-new-split"), command: "openNoteInSplit", uiIcon: "bx bx-dock-right", enabled: noSelectedNotes },+ { title: t("tree-context-menu.open-in-popup"), command: "openNoteInPopup", uiIcon: "bx bx-edit", enabled: noSelectedNotes },isHoisted? null@@ -246,6 +246,8 @@ export default class TreeContextMenu implements SelectMenuItemEventListener<Treeconst { ntxId } = subContexts?.[subContexts.length - 1] ?? {};this.treeWidget.triggerCommand("openNewNoteSplit", { ntxId, notePath });+ } else if (command === "openNoteInPopup") {+ appContext.triggerCommand("openInPopup", { noteIdOrPath: notePath })} else if (command === "convertNoteToAttachment") {if (!(await dialogService.confirm(t("tree-context-menu.convert-to-attachment-confirm")))) {return;diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 90f3b95fba..6d0c0a3db6 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1600,7 +1600,8 @@"import-into-note": "Import into note","apply-bulk-actions": "Apply bulk actions","converted-to-attachments": "{{count}} notes have been converted to attachments.",- "convert-to-attachment-confirm": "Are you sure you want to convert note selected notes into attachments of their parent notes?"+ "convert-to-attachment-confirm": "Are you sure you want to convert note selected notes into attachments of their parent notes?",+ "open-in-popup": "Quick edit"},"shared_info": {"shared_publicly": "This note is shared publicly on",