mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/stable' into redesign
# Conflicts: # package-lock.json # package.json
This commit is contained in:
commit
205f9953f9
2
libraries/ckeditor/ckeditor.js
vendored
2
libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
|||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"description": "Trilium Notes",
|
"description": "Trilium Notes",
|
||||||
"version": "0.47.2",
|
"version": "0.47.3",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -80,7 +80,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"electron": "13.0.0-beta.28",
|
"electron": "13.0.1",
|
||||||
"electron-builder": "22.11.3",
|
"electron-builder": "22.11.3",
|
||||||
"electron-packager": "15.2.0",
|
"electron-packager": "15.2.0",
|
||||||
"electron-rebuild": "2.3.5",
|
"electron-rebuild": "2.3.5",
|
||||||
|
@ -7,7 +7,13 @@ const {LOG_DIR} = require('../../services/data_dir.js');
|
|||||||
function getBackendLog() {
|
function getBackendLog() {
|
||||||
const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`;
|
const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`;
|
||||||
|
|
||||||
return fs.readFileSync(file, 'utf8');
|
try {
|
||||||
|
return fs.readFileSync(file, 'utf8');
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
// most probably the log file does not exist yet - https://github.com/zadam/trilium/issues/1977
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -11,7 +11,7 @@ function sanitize(dirtyHtml) {
|
|||||||
'figure', 'span', 'label', 'input'
|
'figure', 'span', 'label', 'input'
|
||||||
],
|
],
|
||||||
allowedAttributes: {
|
allowedAttributes: {
|
||||||
'a': [ 'href', 'class' ],
|
'a': [ 'href', 'class', 'data-note-path' ],
|
||||||
'img': [ 'src' ],
|
'img': [ 'src' ],
|
||||||
'section': [ 'class', 'data-note-id' ],
|
'section': [ 'class', 'data-note-id' ],
|
||||||
'figure': [ 'class' ],
|
'figure': [ 'class' ],
|
||||||
|
@ -307,6 +307,14 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
|
|||||||
return `href="#root/${targetNoteId}"`;
|
return `href="#root/${targetNoteId}"`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
content = content.replace(/data-note-path="([^"]*)"/g, (match, notePath) => {
|
||||||
|
const noteId = notePath.split("/").pop();
|
||||||
|
|
||||||
|
const targetNoteId = noteIdMap[noteId];
|
||||||
|
|
||||||
|
return `data-note-path="root/${targetNoteId}"`;
|
||||||
|
});
|
||||||
|
|
||||||
if (noteMeta) {
|
if (noteMeta) {
|
||||||
const includeNoteLinks = (noteMeta.attributes || [])
|
const includeNoteLinks = (noteMeta.attributes || [])
|
||||||
.filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink');
|
.filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink');
|
||||||
|
@ -41,13 +41,17 @@ function initLogFile() {
|
|||||||
function checkDate(millisSinceMidnight) {
|
function checkDate(millisSinceMidnight) {
|
||||||
if (millisSinceMidnight >= DAY) {
|
if (millisSinceMidnight >= DAY) {
|
||||||
initLogFile();
|
initLogFile();
|
||||||
|
|
||||||
|
millisSinceMidnight =- DAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return millisSinceMidnight;
|
||||||
}
|
}
|
||||||
|
|
||||||
function log(str) {
|
function log(str) {
|
||||||
const millisSinceMidnight = Date.now() - todaysMidnight.getTime();
|
let millisSinceMidnight = Date.now() - todaysMidnight.getTime();
|
||||||
|
|
||||||
checkDate(millisSinceMidnight);
|
millisSinceMidnight = checkDate(millisSinceMidnight);
|
||||||
|
|
||||||
logFile.write(formatTime(millisSinceMidnight) + ' ' + str + NEW_LINE);
|
logFile.write(formatTime(millisSinceMidnight) + ' ' + str + NEW_LINE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user