mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix history navigation buttons in server, #3527
This commit is contained in:
parent
4f98c960ec
commit
743979266a
2
package-lock.json
generated
2
package-lock.json
generated
@ -30,7 +30,7 @@
|
|||||||
"electron-debug": "3.2.0",
|
"electron-debug": "3.2.0",
|
||||||
"electron-dl": "3.5.0",
|
"electron-dl": "3.5.0",
|
||||||
"electron-window-state": "5.0.3",
|
"electron-window-state": "5.0.3",
|
||||||
"escape-html": "^1.0.3",
|
"escape-html": "1.0.3",
|
||||||
"express": "4.18.2",
|
"express": "4.18.2",
|
||||||
"express-partial-content": "1.0.2",
|
"express-partial-content": "1.0.2",
|
||||||
"express-rate-limit": "6.7.0",
|
"express-rate-limit": "6.7.0",
|
||||||
|
@ -39,7 +39,7 @@ export default class CommandButtonWidget extends AbstractButtonWidget {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {function|string} command
|
* @param {function|string} command
|
||||||
* @returns {CommandButtonWidget}
|
* @returns {this}
|
||||||
*/
|
*/
|
||||||
command(command) {
|
command(command) {
|
||||||
this.settings.command = command;
|
this.settings.command = command;
|
||||||
|
@ -23,6 +23,10 @@ export default class HistoryNavigationButton extends ButtonFromNoteWidget {
|
|||||||
doRender() {
|
doRender() {
|
||||||
super.doRender();
|
super.doRender();
|
||||||
|
|
||||||
|
if (!utils.isElectron()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
|
this.webContents = utils.dynamicRequire('@electron/remote').getCurrentWebContents();
|
||||||
|
|
||||||
// without this the history is preserved across frontend reloads
|
// without this the history is preserved across frontend reloads
|
||||||
|
Loading…
x
Reference in New Issue
Block a user