diff --git a/package.json b/package.json index eadbbaa3a..3f8b82ef1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.41.5", + "version": "0.41.6", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/public/app/desktop.js b/src/public/app/desktop.js index 141b0d80a..774cd3f2c 100644 --- a/src/public/app/desktop.js +++ b/src/public/app/desktop.js @@ -85,7 +85,7 @@ if (utils.isElectron()) { }); } - if (params.linkURL.length !== 0 && params.mediaType === 'none') { + if (!["", "javascript:", "about:blank#blocked"].includes(params.linkURL) && params.mediaType === 'none') { items.push({ title: `Copy link`, uiIcon: "copy", diff --git a/src/public/app/services/utils.js b/src/public/app/services/utils.js index 51244f38f..0fa8e9642 100644 --- a/src/public/app/services/utils.js +++ b/src/public/app/services/utils.js @@ -103,7 +103,7 @@ function download(url) { url += '?' + Date.now(); // don't use cache if (isElectron()) { - const remote = utils.dynamicRequire('electron').remote; + const remote = dynamicRequire('electron').remote; remote.getCurrentWebContents().downloadURL(url); } @@ -277,7 +277,7 @@ function isHtmlEmpty(html) { async function clearBrowserCache() { if (isElectron()) { - const win = utils.dynamicRequire('electron').remote.getCurrentWindow(); + const win = dynamicRequire('electron').remote.getCurrentWindow(); await win.webContents.session.clearCache(); } } diff --git a/src/public/app/widgets/collapsible_widget.js b/src/public/app/widgets/collapsible_widget.js index 9cbd53157..62e1905a9 100644 --- a/src/public/app/widgets/collapsible_widget.js +++ b/src/public/app/widgets/collapsible_widget.js @@ -34,7 +34,8 @@ export default class CollapsibleWidget extends TabAwareWidget { this.$bodyWrapper = this.$widget.find('.body-wrapper'); this.$bodyWrapper.attr('id', this.componentId); // for toggle to work we need id - this.widgetName = this.constructor.name; + // not using constructor name because of webpack mangling class names ... + this.widgetName = this.widgetTitle.replace(/[^[a-zA-Z0-9]/g, "_"); if (!options.is(this.widgetName + 'Collapsed')) { this.$bodyWrapper.collapse("show"); diff --git a/src/public/app/widgets/component.js b/src/public/app/widgets/component.js index c5d037d0d..9ca210248 100644 --- a/src/public/app/widgets/component.js +++ b/src/public/app/widgets/component.js @@ -15,7 +15,7 @@ import Mutex from "../services/mutex.js"; */ export default class Component { constructor() { - this.componentId = `comp-${this.constructor.name}-` + utils.randomString(6); + this.componentId = `comp-` + utils.randomString(8); /** @type Component[] */ this.children = []; this.initialized = Promise.resolve(); diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index a6600cff9..a6c94d1b1 100644 --- a/src/public/app/widgets/note_tree.js +++ b/src/public/app/widgets/note_tree.js @@ -177,7 +177,7 @@ export default class NoteTreeWidget extends TabAwareWidget { // This function MUST be defined to enable dropping of items on the tree. // data.hitMode is 'before', 'after', or 'over'. - const selectedBranchIds = this.getSelectedNodes().map(node => node.data.branchId); + const selectedBranchIds = this.getSelectedOrActiveNodes().map(node => node.data.branchId); if (data.hitMode === "before") { branchService.moveBeforeBranch(selectedBranchIds, node.data.branchId); diff --git a/src/services/build.js b/src/services/build.js index 8ed845b5d..853f0d3c3 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2020-04-20T22:40:02+02:00", buildRevision: "a86177bb597c752fbc96a24d4be7ab5ae6c0344d" }; +module.exports = { buildDate:"2020-04-27T23:46:48+02:00", buildRevision: "0a9462241360e0baac71863af3ce7fb07cfd8c87" };