fix couple of removed stuff

This commit is contained in:
zadam 2023-02-17 16:51:46 +01:00
parent fa6d2ba70b
commit de60b320d3
7 changed files with 20 additions and 19 deletions

View File

@ -102,13 +102,6 @@
"esm": "3.2.25",
"jasmine": "4.5.0",
"jsdoc": "4.0.1",
"build-api-docs": "./bin/build-api-docs.sh",
"postinstall": "node src-build/fix_pdfjs.js"
"better-sqlite3": "8.1.0",
"canvas": "2.11.0",
"ocrad.js": "antimatter15/ocrad.js#master",
"pdfjs-dist": "3.3.122",
"electron": "23.1.0",
"lorem-ipsum": "2.0.8",
"rcedit": "3.0.1",
"webpack": "5.75.0",

View File

@ -106,6 +106,10 @@ export default class RootCommandExecutor extends Component {
await this.showAndHoistSubtree('_search');
}
async showUserGuideCommand() {
await this.showAndHoistSubtree('_userGuide');
}
async showAndHoistSubtree(subtreeNoteId) {
await appContext.tabManager.openContextWithNote(subtreeNoteId, {
activate: true,

View File

@ -75,7 +75,7 @@ const TPL = `
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 */
display: none;
}
@ -195,10 +195,10 @@ const TPL = `
</ul>
</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>
Show Help
<kbd data-command="showHelp"></kbd>
Show User Guide
<kbd data-command="showUserGuide"></kbd>
</li>
<li class="dropdown-item show-about-dialog-button">

View File

@ -1,4 +1,3 @@
import utils from "../../services/utils.js";
import BasicWidget from "../basic_widget.js";
const TPL = `
@ -156,8 +155,4 @@ export default class HelpDialog extends BasicWidget {
doRender() {
this.$widget = $(TPL);
}
showHelpEvent() {
utils.openDialog(this.$widget);
}
}

View File

@ -72,6 +72,12 @@ const HIDDEN_SUBTREE_DEFINITION = {
{ type: 'label', name: 'keepCurrentHoisting' }
]
},
{
id: '_userGuide',
title: 'User Guide',
type: 'text',
icon: 'bx-help-circle'
},
{
// place for user scripts hidden stuff (scripts should not create notes directly under hidden root)
id: '_userHidden',

View File

@ -273,9 +273,9 @@ const DEFAULT_KEYBOARD_ACTIONS = [
scope: "window"
},
{
actionName: "showHelp",
actionName: "showUserGuide",
defaultShortcuts: ["F1"],
description: "Shows built-in Help / cheatsheet",
description: "Shows User Guide",
scope: "window"
},

View File

@ -20,9 +20,12 @@ if (!fs.existsSync(MIGRATIONS_DIR)) {
process.exit(1);
}
const USER_GUIDE_ZIP_DIR = path.resolve(RESOURCE_DIR, "tmp");
module.exports = {
RESOURCE_DIR,
MIGRATIONS_DIR,
DB_INIT_DIR,
ELECTRON_APP_ROOT_DIR
ELECTRON_APP_ROOT_DIR,
USER_GUIDE_ZIP_DIR
};