Notes/src/public/javascripts/services/dialog_command_executor.js

70 lines
2.0 KiB
JavaScript
Raw Normal View History

2020-01-20 22:35:52 +01:00
import Component from "../widgets/component.js";
2020-02-15 10:41:21 +01:00
export default class DialogCommandExecutor extends Component {
jumpToNoteCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/jump_to_note.js").then(d => d.showDialog());
}
2020-02-15 10:41:21 +01:00
showRecentChangesCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/recent_changes.js").then(d => d.showDialog());
}
2020-02-15 10:41:21 +01:00
showAttributesCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/attributes.js").then(d => d.showDialog());
}
2020-02-15 10:41:21 +01:00
showNoteInfoCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/note_info.js").then(d => d.showDialog());
}
2020-02-15 10:41:21 +01:00
showNoteRevisionsCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/note_revisions.js").then(d => d.showCurrentNoteRevisions());
}
2020-02-15 10:41:21 +01:00
showNoteSourceCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/note_source.js").then(d => d.showDialog());
}
2020-02-15 10:41:21 +01:00
showLinkMapCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/link_map.js").then(d => d.showDialog());
}
2020-02-15 10:41:21 +01:00
pasteMarkdownIntoTextCommand() {
2020-01-20 22:35:52 +01:00
import("../dialogs/markdown_import.js").then(d => d.importMarkdownInline());
}
2020-02-15 10:41:21 +01:00
async editBranchPrefixCommand() {
2020-02-14 21:21:47 +01:00
const notePath = this.appContext.tabManager.getActiveTabNotePath();
2020-01-20 22:35:52 +01:00
2020-02-14 21:21:47 +01:00
if (notePath) {
const editBranchPrefixDialog = await import("../dialogs/branch_prefix.js");
editBranchPrefixDialog.showDialog(notePath);
}
2020-01-20 22:35:52 +01:00
}
2020-02-15 18:41:32 +01:00
async cloneNoteIdsToCommand({noteIds}) {
const d = await import("../dialogs/clone_to.js");
d.showDialog(noteIds);
}
2020-02-15 10:41:21 +01:00
async moveBranchIdsToCommand({branchIds}) {
const d = await import("../dialogs/move_to.js");
d.showDialog(branchIds);
}
showOptionsCommand() {
import("../dialogs/options.js").then(d => d.showDialog())
}
showHelpCommand() {
import("../dialogs/help.js").then(d => d.showDialog())
}
showSQLConsoleCommand() {
import("../dialogs/sql_console.js").then(d => d.showDialog())
}
showBackendLogCommand() {
import("../dialogs/backend_log.js").then(d => d.showDialog())
}
2020-01-20 22:35:52 +01:00
}