mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
feat(in-app-help): integrate into existing help command
This commit is contained in:
parent
122c1ad1ec
commit
e24013adf5
@ -90,6 +90,10 @@ export default class RootCommandExecutor extends Component {
|
|||||||
await appContext.tabManager.openTabWithNoteWithHoisting("_backendLog", { activate: true });
|
await appContext.tabManager.openTabWithNoteWithHoisting("_backendLog", { activate: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async showHelpCommand() {
|
||||||
|
await appContext.tabManager.openTabWithNoteWithHoisting("_help", { activate: true });
|
||||||
|
}
|
||||||
|
|
||||||
async showLaunchBarSubtreeCommand() {
|
async showLaunchBarSubtreeCommand() {
|
||||||
const rootNote = utils.isMobile() ? "_lbMobileRoot" : "_lbRoot";
|
const rootNote = utils.isMobile() ? "_lbMobileRoot" : "_lbRoot";
|
||||||
await this.showAndHoistSubtree(rootNote);
|
await this.showAndHoistSubtree(rootNote);
|
||||||
|
@ -226,6 +226,12 @@ const TPL = `
|
|||||||
<kbd data-command="showHelp"></kbd>
|
<kbd data-command="showHelp"></kbd>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="dropdown-item show-help-button" data-trigger-command="showCheatsheet">
|
||||||
|
<span class="bx bx-help-circle"></span>
|
||||||
|
${t("global_menu.show-cheatsheet")}
|
||||||
|
<kbd data-command="showCheatsheet"></kbd>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dropdown-item show-about-dialog-button">
|
<li class="dropdown-item show-about-dialog-button">
|
||||||
<span class="bx bx-info-circle"></span>
|
<span class="bx bx-info-circle"></span>
|
||||||
${t("global_menu.about")}
|
${t("global_menu.about")}
|
||||||
|
@ -153,7 +153,7 @@ export default class HelpDialog extends BasicWidget {
|
|||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
}
|
}
|
||||||
|
|
||||||
showHelpEvent() {
|
showCheatsheetEvent() {
|
||||||
utils.openDialog(this.$widget);
|
utils.openDialog(this.$widget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,8 @@
|
|||||||
"show_hidden_subtree": "Show Hidden Subtree",
|
"show_hidden_subtree": "Show Hidden Subtree",
|
||||||
"show_help": "Show Help",
|
"show_help": "Show Help",
|
||||||
"about": "About TriliumNext Notes",
|
"about": "About TriliumNext Notes",
|
||||||
"logout": "Logout"
|
"logout": "Logout",
|
||||||
|
"show-cheatsheet": "Show Cheatsheet"
|
||||||
},
|
},
|
||||||
"sync_status": {
|
"sync_status": {
|
||||||
"unknown": "<p>Sync status will be known once the next sync attempt starts.</p><p>Click to trigger sync now.</p>",
|
"unknown": "<p>Sync status will be known once the next sync attempt starts.</p><p>Click to trigger sync now.</p>",
|
||||||
|
@ -344,6 +344,12 @@ function getDefaultKeyboardActions() {
|
|||||||
description: t("keyboard_actions.show-help"),
|
description: t("keyboard_actions.show-help"),
|
||||||
scope: "window"
|
scope: "window"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
actionName: "showCheatsheet",
|
||||||
|
defaultShortcuts: ["Shift+F1"],
|
||||||
|
description: t("keyboard_actions.show-cheatsheet"),
|
||||||
|
scope: "window"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
separator: t("keyboard_actions.text-note-operations")
|
separator: t("keyboard_actions.text-note-operations")
|
||||||
|
@ -51,6 +51,7 @@ const enum KeyboardActionNamesEnum {
|
|||||||
showRecentChanges,
|
showRecentChanges,
|
||||||
showSQLConsole,
|
showSQLConsole,
|
||||||
showBackendLog,
|
showBackendLog,
|
||||||
|
showCheatsheet,
|
||||||
showHelp,
|
showHelp,
|
||||||
addLinkToText,
|
addLinkToText,
|
||||||
followLinkUnderCursor,
|
followLinkUnderCursor,
|
||||||
|
@ -88,10 +88,11 @@
|
|||||||
"reset-zoom-level": "Reset zoom level",
|
"reset-zoom-level": "Reset zoom level",
|
||||||
"copy-without-formatting": "Copy selected text without formatting",
|
"copy-without-formatting": "Copy selected text without formatting",
|
||||||
"force-save-revision": "Force creating / saving new note revision of the active note",
|
"force-save-revision": "Force creating / saving new note revision of the active note",
|
||||||
"show-help": "Shows built-in Help / cheatsheet",
|
"show-help": "Shows the built-in User Guide",
|
||||||
"toggle-book-properties": "Toggle Book Properties",
|
"toggle-book-properties": "Toggle Book Properties",
|
||||||
"toggle-classic-editor-toolbar": "Toggle the Formatting tab for the editor with fixed toolbar",
|
"toggle-classic-editor-toolbar": "Toggle the Formatting tab for the editor with fixed toolbar",
|
||||||
"export-as-pdf": "Exports the current note as a PDF"
|
"export-as-pdf": "Exports the current note as a PDF",
|
||||||
|
"show-cheatsheet": "Shows a modal with common keyboard operations"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"title": "Login",
|
"title": "Login",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user