mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/stable'
This commit is contained in:
commit
cd858a73c1
@ -2,7 +2,7 @@
|
|||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"description": "Trilium Notes",
|
"description": "Trilium Notes",
|
||||||
"version": "0.45.7",
|
"version": "0.45.8",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -1 +1 @@
|
|||||||
module.exports = { buildDate:"2020-12-22T20:21:15+01:00", buildRevision: "bdfd760b9d428dc29c45a0e016d12a25af220043" };
|
module.exports = { buildDate:"2021-01-11T22:29:31+01:00", buildRevision: "369274ead75947a68bf7bbb5ab1e784e81521030" };
|
||||||
|
@ -234,7 +234,7 @@ function exportToZip(taskContext, branch, format, res) {
|
|||||||
<link rel="stylesheet" href="${cssUrl}">
|
<link rel="stylesheet" href="${cssUrl}">
|
||||||
<base target="_parent">
|
<base target="_parent">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="ck-content">
|
||||||
<h1>${utils.escapeHtml(title)}</h1>
|
<h1>${utils.escapeHtml(title)}</h1>
|
||||||
${content}
|
${content}
|
||||||
</body>
|
</body>
|
||||||
|
@ -31,10 +31,7 @@ function initNotSyncedOptions(initialized, startNotePath = 'root', opts = {}) {
|
|||||||
optionService.createOption('openTabs', JSON.stringify([
|
optionService.createOption('openTabs', JSON.stringify([
|
||||||
{
|
{
|
||||||
notePath: startNotePath,
|
notePath: startNotePath,
|
||||||
active: true,
|
active: true
|
||||||
sidebar: {
|
|
||||||
widgets: []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]), false);
|
]), false);
|
||||||
|
|
||||||
@ -102,6 +99,15 @@ function initStartupOptions() {
|
|||||||
log.info(`Created missing option "${name}" with default value "${value}"`);
|
log.info(`Created missing option "${name}" with default value "${value}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.TRILIUM_START_NOTE_ID) {
|
||||||
|
optionService.setOption('openTabs', JSON.stringify([
|
||||||
|
{
|
||||||
|
notePath: process.env.TRILIUM_START_NOTE_ID,
|
||||||
|
active: true
|
||||||
|
}
|
||||||
|
]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKeyboardDefaultOptions() {
|
function getKeyboardDefaultOptions() {
|
||||||
|
@ -32,11 +32,15 @@ class NoteContentProtectedFulltextExp extends Expression {
|
|||||||
FROM notes JOIN note_contents USING (noteId)
|
FROM notes JOIN note_contents USING (noteId)
|
||||||
WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 1`)) {
|
WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 1`)) {
|
||||||
|
|
||||||
|
if (!inputNoteSet.hasNoteId(noteId) || !(noteId in noteCache.notes)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
content = protectedSessionService.decryptString(content);
|
content = protectedSessionService.decryptString(content);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
log.info('Cannot decrypt content of note', noteId);
|
log.info(`Cannot decrypt content of note ${noteId}`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,11 +54,7 @@ class NoteContentProtectedFulltextExp extends Expression {
|
|||||||
content = content.replace(/ /g, ' ');
|
content = content.replace(/ /g, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.tokens.find(token => !content.includes(token))) {
|
if (!this.tokens.find(token => !content.includes(token))) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputNoteSet.hasNoteId(noteId) && noteId in noteCache.notes) {
|
|
||||||
resultNoteSet.add(noteCache.notes[noteId]);
|
resultNoteSet.add(noteCache.notes[noteId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,10 @@ class NoteContentUnprotectedFulltextExp extends Expression {
|
|||||||
FROM notes JOIN note_contents USING (noteId)
|
FROM notes JOIN note_contents USING (noteId)
|
||||||
WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 0`)) {
|
WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 0`)) {
|
||||||
|
|
||||||
|
if (!inputNoteSet.hasNoteId(noteId) || !(noteId in noteCache.notes)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
content = content.toString().toLowerCase();
|
content = content.toString().toLowerCase();
|
||||||
|
|
||||||
if (type === 'text' && mime === 'text/html') {
|
if (type === 'text' && mime === 'text/html') {
|
||||||
@ -36,11 +40,7 @@ class NoteContentUnprotectedFulltextExp extends Expression {
|
|||||||
content = content.replace(/ /g, ' ');
|
content = content.replace(/ /g, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.tokens.find(token => !content.includes(token))) {
|
if (!this.tokens.find(token => !content.includes(token))) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputNoteSet.hasNoteId(noteId) && noteId in noteCache.notes) {
|
|
||||||
resultNoteSet.add(noteCache.notes[noteId]);
|
resultNoteSet.add(noteCache.notes[noteId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user