This commit is contained in:
SiriusXT 2023-05-27 14:14:31 +08:00
commit 5286d4a97c
7 changed files with 856 additions and 477 deletions

1270
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -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": {
@ -33,10 +33,10 @@
"dependencies": {
"@braintree/sanitize-url": "6.0.2",
"@electron/remote": "2.0.9",
"@excalidraw/excalidraw": "0.14.2",
"@excalidraw/excalidraw": "0.15.2",
"archiver": "5.3.1",
"async-mutex": "0.4.0",
"axios": "1.3.5",
"axios": "1.4.0",
"better-sqlite3": "7.4.5",
"chokidar": "3.5.3",
"cls-hooked": "4.2.2",
@ -71,19 +71,19 @@
"jsdom": "21.1.1",
"mime-types": "2.1.35",
"multer": "1.4.5-lts.1",
"node-abi": "3.35.0",
"node-abi": "3.40.0",
"normalize-strings": "1.1.1",
"open": "8.4.1",
"rand-token": "1.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"request": "2.88.2",
"rimraf": "5.0.0",
"rimraf": "5.0.1",
"safe-compare": "1.1.4",
"sanitize-filename": "1.6.3",
"sanitize-html": "2.10.0",
"sax": "1.2.4",
"semver": "7.3.8",
"semver": "7.5.1",
"serve-favicon": "2.5.0",
"session-file-store": "1.5.0",
"stream-throttle": "0.1.3",
@ -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": {
@ -105,20 +105,20 @@
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsonc": "2.7.0",
"eslint-plugin-jsonc": "2.8.0",
"eslint-plugin-prettier": "4.2.1",
"esm": "3.2.25",
"husky": "8.0.3",
"jsonc-eslint-parser": "2.2.0",
"lint-staged": "13.2.1",
"jsonc-eslint-parser": "2.3.0",
"lint-staged": "13.2.2",
"jasmine": "4.6.0",
"jsdoc": "4.0.2",
"lorem-ipsum": "2.0.8",
"prettier": "2.8.7",
"prettier": "2.8.8",
"nodemon": "2.0.22",
"rcedit": "3.0.1",
"webpack": "5.78.0",
"webpack-cli": "5.0.1"
"webpack": "5.84.1",
"webpack-cli": "5.1.1"
},
"optionalDependencies": {
"electron-installer-debian": "3.1.0"

View file

@ -314,7 +314,7 @@ class FNote {
return [['root']];
}
const parentNotes = this.getParentNotes();
const parentNotes = this.getParentNotes().filter(note => note.type !== 'search');
let notePaths = [];
if (parentNotes.length === 1) { // optimization for most common case

View file

@ -105,11 +105,14 @@ function goToLink(evt) {
const ctrlKey = utils.isCtrlKey(evt);
const leftClick = evt.which === 1;
const middleClick = evt.which === 2;
if (notePath) {
if ((evt.which === 1 && ctrlKey) || evt.which === 2) {
if ((leftClick && ctrlKey) || middleClick) {
appContext.tabManager.openTabWithNoteWithHoisting(notePath);
}
else if (evt.which === 1) {
else if (leftClick) {
const ntxId = $(evt.target).closest("[data-ntx-id]").attr("data-ntx-id");
const noteContext = ntxId
@ -124,9 +127,12 @@ function goToLink(evt) {
}
}
else {
if ((evt.which === 1 && ctrlKey) || evt.which === 2
|| $link.hasClass("ck-link-actions__preview") // within edit link dialog single click suffices
|| $link.closest("[contenteditable]").length === 0 // outside of CKEditor single click suffices
const withinEditLink = $link.hasClass("ck-link-actions__preview");
const outsideOfCKEditor = $link.closest("[contenteditable]").length === 0;
if ((leftClick && ctrlKey) || middleClick
|| (withinEditLink && (leftClick || middleClick))
|| (outsideOfCKEditor && (leftClick || middleClick))
) {
if (address) {
if (address.toLowerCase().startsWith('http')) {

View file

@ -31,6 +31,11 @@ const TPL = `
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;
border: 1px solid var(--main-border-color);

View file

@ -132,15 +132,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) {

View file

@ -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" };