mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/stable'
# Conflicts: # src/public/app/dialogs/options/other.js
This commit is contained in:
commit
034aaa7209
@ -2,7 +2,7 @@
|
|||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"description": "Trilium Notes",
|
"description": "Trilium Notes",
|
||||||
"version": "0.48.7",
|
"version": "0.48.8",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -43,7 +43,7 @@ const TPL = `
|
|||||||
<div id="image-compression-enabled-wraper">
|
<div id="image-compression-enabled-wraper">
|
||||||
<div class="form-group">
|
<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>
|
<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>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -81,7 +81,7 @@ const TPL = `
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="protected-session-timeout-in-seconds">Protected session timeout (in seconds)</label>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ const TPL = `
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="note-revision-snapshot-time-interval-in-seconds">Note revision snapshot time interval (in seconds)</label>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -103,12 +103,12 @@ const TPL = `
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="auto-readonly-size-text">Automatic readonly size (text notes)</label>
|
<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>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="auto-readonly-size-code">Automatic readonly size (code notes)</label>
|
<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>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
|
@ -202,6 +202,10 @@ function changeTitle(req) {
|
|||||||
|
|
||||||
const noteTitleChanged = note.title !== title;
|
const noteTitleChanged = note.title !== title;
|
||||||
|
|
||||||
|
if (noteTitleChanged) {
|
||||||
|
noteService.saveNoteRevision(note);
|
||||||
|
}
|
||||||
|
|
||||||
note.title = title;
|
note.title = title;
|
||||||
|
|
||||||
note.save();
|
note.save();
|
||||||
|
@ -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" };
|
||||||
|
@ -56,8 +56,7 @@ function getYearNote(dateStr, rootNote) {
|
|||||||
|
|
||||||
const yearStr = dateStr.substr(0, 4);
|
const yearStr = dateStr.substr(0, 4);
|
||||||
|
|
||||||
let yearNote = attributeService.getNoteWithLabel(YEAR_LABEL, yearStr)
|
let yearNote = attributeService.getNoteWithLabel(YEAR_LABEL, yearStr);
|
||||||
|| getNoteStartingWith(rootNote.noteId, yearStr);
|
|
||||||
|
|
||||||
if (yearNote) {
|
if (yearNote) {
|
||||||
return yearNote;
|
return yearNote;
|
||||||
@ -103,18 +102,12 @@ function getMonthNote(dateStr, rootNote) {
|
|||||||
return monthNote;
|
return monthNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
const yearNote = getYearNote(dateStr, rootNote);
|
|
||||||
|
|
||||||
monthNote = getNoteStartingWith(yearNote.noteId, monthNumber);
|
|
||||||
|
|
||||||
if (monthNote) {
|
|
||||||
return monthNote;
|
|
||||||
}
|
|
||||||
|
|
||||||
const dateObj = dateUtils.parseLocalDate(dateStr);
|
const dateObj = dateUtils.parseLocalDate(dateStr);
|
||||||
|
|
||||||
const noteTitle = getMonthNoteTitle(rootNote, monthNumber, dateObj);
|
const noteTitle = getMonthNoteTitle(rootNote, monthNumber, dateObj);
|
||||||
|
|
||||||
|
const yearNote = getYearNote(dateStr, rootNote);
|
||||||
|
|
||||||
sql.transactional(() => {
|
sql.transactional(() => {
|
||||||
monthNote = createNote(yearNote, noteTitle);
|
monthNote = createNote(yearNote, noteTitle);
|
||||||
|
|
||||||
|
@ -918,5 +918,6 @@ module.exports = {
|
|||||||
getUndeletedParentBranchIds,
|
getUndeletedParentBranchIds,
|
||||||
triggerNoteTitleChanged,
|
triggerNoteTitleChanged,
|
||||||
eraseDeletedNotesNow,
|
eraseDeletedNotesNow,
|
||||||
eraseNotesWithDeleteId
|
eraseNotesWithDeleteId,
|
||||||
|
saveNoteRevision
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user