Merge remote-tracking branch 'origin/stable'

# Conflicts:
#	src/public/app/dialogs/options/other.js
This commit is contained in:
zadam 2021-12-14 21:54:38 +01:00
commit 034aaa7209
6 changed files with 16 additions and 18 deletions

View File

@ -2,7 +2,7 @@
"name": "trilium",
"productName": "Trilium Notes",
"description": "Trilium Notes",
"version": "0.48.7",
"version": "0.48.8",
"license": "AGPL-3.0-only",
"main": "electron.js",
"bin": {

View File

@ -43,7 +43,7 @@ const TPL = `
<div id="image-compression-enabled-wraper">
<div class="form-group">
<label for="image-max-width-height">Max width / height of an image in pixels (image will be resized if it exceeds this setting).</label>
<input class="form-control" id="image-max-width-height" type="number">
<input class="form-control" id="image-max-width-height" type="number" min="1">
</div>
<div class="form-group">
@ -81,7 +81,7 @@ const TPL = `
<div class="form-group">
<label for="protected-session-timeout-in-seconds">Protected session timeout (in seconds)</label>
<input class="form-control" id="protected-session-timeout-in-seconds" type="number">
<input class="form-control" id="protected-session-timeout-in-seconds" type="number" min="60">
</div>
</div>
@ -92,7 +92,7 @@ const TPL = `
<div class="form-group">
<label for="note-revision-snapshot-time-interval-in-seconds">Note revision snapshot time interval (in seconds)</label>
<input class="form-control" id="note-revision-snapshot-time-interval-in-seconds" type="number">
<input class="form-control" id="note-revision-snapshot-time-interval-in-seconds" type="number" min="10">
</div>
</div>
@ -103,12 +103,12 @@ const TPL = `
<div class="form-group">
<label for="auto-readonly-size-text">Automatic readonly size (text notes)</label>
<input class="form-control" id="auto-readonly-size-text" type="number">
<input class="form-control" id="auto-readonly-size-text" type="number" min="0">
</div>
<div class="form-group">
<label for="auto-readonly-size-code">Automatic readonly size (code notes)</label>
<input class="form-control" id="auto-readonly-size-code" type="number">
<input class="form-control" id="auto-readonly-size-code" type="number" min="0">
</div>
</div>`;

View File

@ -202,6 +202,10 @@ function changeTitle(req) {
const noteTitleChanged = note.title !== title;
if (noteTitleChanged) {
noteService.saveNoteRevision(note);
}
note.title = title;
note.save();

View File

@ -1 +1 @@
module.exports = { buildDate:"2021-11-23T21:53:32+01:00", buildRevision: "24210ef80c8585b64a00cd5316ae1c1563e0c9f7" };
module.exports = { buildDate:"2021-12-13T11:12:31+01:00", buildRevision: "d9550dd59b9b0dff0b229c400cdf6585abcb226a" };

View File

@ -56,8 +56,7 @@ function getYearNote(dateStr, rootNote) {
const yearStr = dateStr.substr(0, 4);
let yearNote = attributeService.getNoteWithLabel(YEAR_LABEL, yearStr)
|| getNoteStartingWith(rootNote.noteId, yearStr);
let yearNote = attributeService.getNoteWithLabel(YEAR_LABEL, yearStr);
if (yearNote) {
return yearNote;
@ -103,18 +102,12 @@ function getMonthNote(dateStr, rootNote) {
return monthNote;
}
const yearNote = getYearNote(dateStr, rootNote);
monthNote = getNoteStartingWith(yearNote.noteId, monthNumber);
if (monthNote) {
return monthNote;
}
const dateObj = dateUtils.parseLocalDate(dateStr);
const noteTitle = getMonthNoteTitle(rootNote, monthNumber, dateObj);
const yearNote = getYearNote(dateStr, rootNote);
sql.transactional(() => {
monthNote = createNote(yearNote, noteTitle);

View File

@ -918,5 +918,6 @@ module.exports = {
getUndeletedParentBranchIds,
triggerNoteTitleChanged,
eraseDeletedNotesNow,
eraseNotesWithDeleteId
eraseNotesWithDeleteId,
saveNoteRevision
};