From 86cf8f32027c48f3badc9f764deed060f468120e Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 27 Apr 2020 20:58:31 +0200 Subject: [PATCH 1/6] fix download/export --- src/public/app/services/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/app/services/utils.js b/src/public/app/services/utils.js index ad490c982..966f5c1fc 100644 --- a/src/public/app/services/utils.js +++ b/src/public/app/services/utils.js @@ -99,7 +99,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); } @@ -273,7 +273,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(); } } From cba7e5a59fd0dce26506e341007cd6b3357b6b9b Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 27 Apr 2020 21:44:25 +0200 Subject: [PATCH 2/6] fix collapsing of note revisions --- src/public/app/widgets/collapsible_widget.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); From 56ce23fc36023dd61c2c46bba8197d8ff8b4cbf9 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 27 Apr 2020 22:13:32 +0200 Subject: [PATCH 3/6] fix collapsing of note revisions --- src/public/app/widgets/component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); From 0a9462241360e0baac71863af3ce7fb07cfd8c87 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 27 Apr 2020 23:39:10 +0200 Subject: [PATCH 4/6] fix drag and drop in the tree, closes #984 --- src/public/app/widgets/note_tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.js index 368da7425..7005579dc 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); From ccdb41841eb4d0bec4a20a37cc0f4afca8371364 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 27 Apr 2020 23:46:48 +0200 Subject: [PATCH 5/6] release 0.41.6 --- package.json | 2 +- src/services/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ff3b9a9c5..125d75312 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/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" }; From 94b57dadd7a2c3072e0ff709c1c23a08184f55ba Mon Sep 17 00:00:00 2001 From: zadam Date: Wed, 29 Apr 2020 22:27:22 +0200 Subject: [PATCH 6/6] removed link context menu on JS-only links --- src/public/app/desktop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/app/desktop.js b/src/public/app/desktop.js index 135f0727f..2dffc20a2 100644 --- a/src/public/app/desktop.js +++ b/src/public/app/desktop.js @@ -82,7 +82,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",