mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
global menu can open the user guide
This commit is contained in:
parent
94dcaae12d
commit
d2b906bc1b
@ -100,6 +100,10 @@ export default class RootCommandExecutor extends Component {
|
|||||||
await this.showAndHoistSubtree('_search');
|
await this.showAndHoistSubtree('_search');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async showUserGuideCommand() {
|
||||||
|
await this.showAndHoistSubtree('_userGuide');
|
||||||
|
}
|
||||||
|
|
||||||
async showAndHoistSubtree(subtreeNoteId) {
|
async showAndHoistSubtree(subtreeNoteId) {
|
||||||
await appContext.tabManager.openContextWithNote(subtreeNoteId, true, null, subtreeNoteId);
|
await appContext.tabManager.openContextWithNote(subtreeNoteId, true, null, subtreeNoteId);
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ const TPL = `
|
|||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.mobile .show-help-button, body.mobile .show-about-dialog-button {
|
body.mobile .show-user-guide-button, body.mobile .show-about-dialog-button {
|
||||||
/* hidden because these dialogs are not available for mobile */
|
/* hidden because these dialogs are not available for mobile */
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -194,10 +194,10 @@ const TPL = `
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown-item show-help-button" data-trigger-command="showHelp">
|
<li class="dropdown-item show-user-guide-button" data-trigger-command="showUserGuide">
|
||||||
<span class="bx bx-info-circle"></span>
|
<span class="bx bx-info-circle"></span>
|
||||||
Show Help
|
Show User Guide
|
||||||
<kbd data-command="showHelp"></kbd>
|
<kbd data-command="showUserGuide"></kbd>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown-item show-about-dialog-button">
|
<li class="dropdown-item show-about-dialog-button">
|
||||||
|
@ -156,8 +156,4 @@ export default class HelpDialog extends BasicWidget {
|
|||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
}
|
}
|
||||||
|
|
||||||
showHelpEvent() {
|
|
||||||
utils.openDialog(this.$widget);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ const DEFAULT_KEYBOARD_ACTIONS = [
|
|||||||
scope: "window"
|
scope: "window"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionName: "showHelp",
|
actionName: "showUserGuide",
|
||||||
defaultShortcuts: ["F1"],
|
defaultShortcuts: ["F1"],
|
||||||
description: "Shows built-in Help / cheatsheet",
|
description: "Shows built-in Help / cheatsheet",
|
||||||
scope: "window"
|
scope: "window"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user