mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge branch 'master' into next61
# Conflicts: # package-lock.json # package.json # src/public/app/entities/fnote.js # src/public/app/services/link.js
This commit is contained in:
commit
c2f70031d0
@ -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": {
|
||||
|
@ -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
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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" };
|
||||
|
Loading…
x
Reference in New Issue
Block a user