diff --git a/package-lock.json b/package-lock.json index 685633b79..854eba822 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.30.6", + "version": "0.30.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/public/javascripts/services/note_detail_file.js b/src/public/javascripts/services/note_detail_file.js index 23f8e9f06..8bb8ca605 100644 --- a/src/public/javascripts/services/note_detail_file.js +++ b/src/public/javascripts/services/note_detail_file.js @@ -34,6 +34,9 @@ async function show() { else { $previewRow.hide(); } + + // open doesn't work for protected notes since it works through browser which isn't in protected session + $openButton.toggle(!currentNote.isProtected); } $downloadButton.click(() => utils.download(getFileUrl())); @@ -51,7 +54,7 @@ $openButton.click(() => { function getFileUrl() { // electron needs absolute URL so we extract current host, port, protocol - return utils.getHost() + "/api/notes/" + noteDetailService.getCurrentNoteId(); + return utils.getHost() + "/api/notes/" + noteDetailService.getCurrentNoteId() + "/download"; } export default {