From e9454e4db7c8c518d0f6ab6239b1dad5ffac797d Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 2 Dec 2019 23:04:22 +0100 Subject: [PATCH 1/6] fix SQL console scrolling (cherry picked from commit 749bb90713f5aa88dcd5454fb70af750320931ba) --- src/public/stylesheets/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 97f0f6eac..e77148331 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -411,6 +411,10 @@ div.ui-tooltip { height: 150px; } +#sql-console-query .CodeMirror-scroll { + min-height: inherit !important; +} + .btn { border-radius: var(--button-border-radius); } From f740e52ebf61db33dc3a5668ae31419251b66b53 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 2 Dec 2019 20:21:52 +0100 Subject: [PATCH 2/6] correctly respect label @disableVersioning (cherry picked from commit dc063983ea736f338e1d01d0863ee6f5ae40b2ee) --- src/services/image.js | 2 -- src/services/note_revisions.js | 8 ++++---- src/services/notes.js | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/services/image.js b/src/services/image.js index 34cdb6ec7..55db82f86 100644 --- a/src/services/image.js +++ b/src/services/image.js @@ -12,9 +12,7 @@ const imageminGifLossy = require('imagemin-giflossy'); const jimp = require('jimp'); const imageType = require('image-type'); const sanitizeFilename = require('sanitize-filename'); -const dateUtils = require('./date_utils'); const noteRevisionService = require('./note_revisions.js'); -const NoteRevision = require("../entities/note_revision"); async function processImage(uploadBuffer, originalName, shrinkImageSwitch) { const origImageFormat = imageType(uploadBuffer); diff --git a/src/services/note_revisions.js b/src/services/note_revisions.js index 02a567b47..c2f607bb1 100644 --- a/src/services/note_revisions.js +++ b/src/services/note_revisions.js @@ -7,10 +7,6 @@ const dateUtils = require('../services/date_utils'); * @param {Note} note */ async function protectNoteRevisions(note) { - if (await note.hasLabel('disableVersioning')) { - return; - } - for (const revision of await note.getRevisions()) { if (note.isProtected !== revision.isProtected) { const content = await revision.getContent(); @@ -30,6 +26,10 @@ async function protectNoteRevisions(note) { * @return {NoteRevision} */ async function createNoteRevision(note) { + if (await note.hasLabel("disableVersioning")) { + return; + } + const noteRevision = await new NoteRevision({ noteId: note.noteId, // title and text should be decrypted now diff --git a/src/services/notes.js b/src/services/notes.js index 344a60f62..c10a070b3 100644 --- a/src/services/notes.js +++ b/src/services/notes.js @@ -308,8 +308,7 @@ async function saveLinks(note, content) { } async function saveNoteRevision(note) { - // files and images are immutable, they can't be updated - // but we don't even version titles which is probably not correct + // files and images are versioned separately if (note.type === 'file' || note.type === 'image' || await note.hasLabel('disableVersioning')) { return; } From 6ba3e5ab7f866ac93ecbb48883dabf61723cde98 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 2 Dec 2019 23:07:19 +0100 Subject: [PATCH 3/6] backport fix from master to avoid doubled attributes inherited from multiple paths --- src/entities/note.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entities/note.js b/src/entities/note.js index d6506bf50..335015339 100644 --- a/src/entities/note.js +++ b/src/entities/note.js @@ -334,6 +334,11 @@ class Note extends Entity { // we order by noteId so that attributes from same note stay together. Actual noteId ordering doesn't matter. const filteredAttributes = attributes.filter((attr, index) => { + // if this exact attribute already appears then don't include it (can happen via cloning) + if (attributes.findIndex(it => it.attributeId === attr.attributeId) !== index) { + return false; + } + if (attr.isDefinition()) { const firstDefinitionIndex = attributes.findIndex(el => el.type === attr.type && el.name === attr.name); From a1402c7c66441ae83618f9ca870aa86ed8f83e18 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 2 Dec 2019 23:09:42 +0100 Subject: [PATCH 4/6] release 0.37.7 --- package.json | 2 +- src/services/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7d2bbae0a..a835e574e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.37.6", + "version": "0.37.7", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/services/build.js b/src/services/build.js index 048f42121..7ce6b5544 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2019-11-26T22:50:08+01:00", buildRevision: "5193f073e9e55f5440fe2e71fbd2cdfcdb2d2c6b" }; +module.exports = { buildDate:"2019-12-02T23:09:42+01:00", buildRevision: "6ba3e5ab7f866ac93ecbb48883dabf61723cde98" }; From 4dc285d84f9ca4975c1451b95e11abe53d787a24 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 3 Dec 2019 19:31:58 +0100 Subject: [PATCH 5/6] serve favicon from relative path --- package-lock.json | 2 +- src/views/desktop.ejs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index b51033fc2..daf4b6d8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.37.6", + "version": "0.37.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/views/desktop.ejs b/src/views/desktop.ejs index e6a078476..2fe2aa438 100644 --- a/src/views/desktop.ejs +++ b/src/views/desktop.ejs @@ -2,6 +2,7 @@ + Trilium Notes From 761c51069a6e601217a986f4c75e20421f54e758 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 3 Dec 2019 19:47:53 +0100 Subject: [PATCH 6/6] use max-height for promoted attributes, #739 --- src/public/stylesheets/style.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index e77148331..d36046ae3 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -464,9 +464,10 @@ button.icon-button { margin: auto; /* setting the display to block since "table" doesn't support scrolling */ display: block; - flex-basis: content; - flex-shrink: 1; + /** flex-basis: content; - use once "content" is implemented by chrome */ + flex-shrink: 0; flex-grow: 0; + max-height: 30%; overflow: auto; }