diff --git a/package.json b/package.json index d48a2033f..f240d3efb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.60.0-beta", + "version": "0.60.1-beta", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { @@ -92,7 +92,7 @@ "turndown": "7.1.2", "unescape": "1.0.1", "ws": "8.13.0", - "xml2js": "0.5.0", + "xml2js": "0.6.0", "yauzl": "2.10.0" }, "devDependencies": { @@ -117,7 +117,7 @@ "prettier": "2.8.8", "nodemon": "2.0.22", "rcedit": "3.0.1", - "webpack": "5.83.1", + "webpack": "5.84.1", "webpack-cli": "5.1.1" }, "optionalDependencies": { diff --git a/src/public/app/entities/fnote.js b/src/public/app/entities/fnote.js index 506e466bb..8cd398c5d 100644 --- a/src/public/app/entities/fnote.js +++ b/src/public/app/entities/fnote.js @@ -357,7 +357,7 @@ class FNote { return [['root']]; } - const parentNotes = this.getParentNotes(); + const parentNotes = this.getParentNotes().filter(note => note.type !== 'search'); const notePaths = parentNotes.length === 1 ? parentNotes[0].getAllNotePaths() // optimization for the most common case diff --git a/src/public/app/services/link.js b/src/public/app/services/link.js index c35025f99..c532803e1 100644 --- a/src/public/app/services/link.js +++ b/src/public/app/services/link.js @@ -170,6 +170,9 @@ function goToLink(evt) { const isMiddleClick = evt.which === 2; const openInNewTab = (isLeftClick && ctrlKey) || isMiddleClick; + const leftClick = evt.which === 1; + const middleClick = evt.which === 2; + if (notePath) { if (openInNewTab) { appContext.tabManager.openTabWithNoteWithHoisting(notePath, { viewScope }); @@ -189,11 +192,13 @@ function goToLink(evt) { } } else if (hrefLink) { - // this branch handles external links - const isWithinCKLinkDialog = $link.hasClass("ck-link-actions__preview"); - const isOutsideCKEditor = $link.closest("[contenteditable]").length === 0; + const withinEditLink = $link.hasClass("ck-link-actions__preview"); + const outsideOfCKEditor = $link.closest("[contenteditable]").length === 0; - if (openInNewTab || isWithinCKLinkDialog || isOutsideCKEditor) { + if (openInNewTab + || (withinEditLink && (leftClick || middleClick)) + || (outsideOfCKEditor && (leftClick || middleClick)) + ) { if (hrefLink.toLowerCase().startsWith('http')) { window.open(hrefLink, '_blank'); } diff --git a/src/public/app/services/note_list_renderer.js b/src/public/app/services/note_list_renderer.js index 54881cc23..7981ef5b9 100644 --- a/src/public/app/services/note_list_renderer.js +++ b/src/public/app/services/note_list_renderer.js @@ -30,6 +30,11 @@ const TPL = ` .note-list.grid-view .note-book-card { max-height: 300px; } + + .note-list.grid-view .note-book-card img { + max-height: 220px; + object-fit: contain; + } .note-list.grid-view .note-book-card:hover { cursor: pointer; diff --git a/src/routes/api/note_revisions.js b/src/routes/api/note_revisions.js index a41e95033..fbe8a52a9 100644 --- a/src/routes/api/note_revisions.js +++ b/src/routes/api/note_revisions.js @@ -148,15 +148,15 @@ function getEditedNotesOnDate(req) { notes = notes.filter(note => note.hasAncestor(hoistedNoteId)); } - notes = notes.map(note => note.getPojo()); - - for (const note of notes) { + return notes.map(note => { const notePath = note.isDeleted ? null : getNotePathData(note); - note.notePath = notePath ? notePath.notePath : null; - } + const notePojo = note.getPojo(); + notePojo.notePath = notePath ? notePath.notePath : null; + + return notePojo; + }); - return notes; } function getNotePathData(note) { diff --git a/src/services/build.js b/src/services/build.js index f9256be1b..88c7d6157 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2023-05-18T23:31:57+02:00", buildRevision: "14dd2b882750ea5484d1aba1f2b57c931bc76e9c" }; +module.exports = { buildDate:"2023-05-26T23:11:53+02:00", buildRevision: "82efc924136c5b215e39f2108f00dd2bf075271c" };