mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
implemented "search in subtree"
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Component from "../widgets/component.js";
|
||||
import appContext from "./app_context.js";
|
||||
import dateNoteService from "../services/date_notes.js";
|
||||
import noteCreateService from "../services/note_create.js";
|
||||
import treeService from "../services/tree.js";
|
||||
|
||||
export default class DialogCommandExecutor extends Component {
|
||||
jumpToNoteCommand() {
|
||||
@@ -75,6 +75,16 @@ export default class DialogCommandExecutor extends Component {
|
||||
appContext.triggerCommand('focusOnSearchDefinition', {tabId: tabContext.tabId});
|
||||
}
|
||||
|
||||
async searchInSubtreeCommand({notePath}) {
|
||||
const noteId = treeService.getNoteIdFromNotePath(notePath);
|
||||
|
||||
const searchNote = await dateNoteService.createSearchNote(noteId);
|
||||
|
||||
const tabContext = await appContext.tabManager.openTabWithNote(searchNote.noteId, true);
|
||||
|
||||
appContext.triggerCommand('focusOnSearchDefinition', {tabId: tabContext.tabId});
|
||||
}
|
||||
|
||||
showBackendLogCommand() {
|
||||
import("../dialogs/backend_log.js").then(d => d.showDialog());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user