From a402c792870ed8138d7392408e1a172c7de07fff Mon Sep 17 00:00:00 2001 From: Rai Date: Sun, 27 Nov 2022 19:33:05 -0800 Subject: [PATCH 1/4] Add Ctrl+PgUp/Dn for tab switching, pointer to Electron docs --- src/public/app/widgets/dialogs/options/shortcuts.js | 5 ++++- src/services/keyboard_actions.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/public/app/widgets/dialogs/options/shortcuts.js b/src/public/app/widgets/dialogs/options/shortcuts.js index 34abd5c29..224431850 100644 --- a/src/public/app/widgets/dialogs/options/shortcuts.js +++ b/src/public/app/widgets/dialogs/options/shortcuts.js @@ -7,7 +7,10 @@ const TPL = `

Keyboard shortcuts

-

Multiple shortcuts for the same action can be separated by comma.

+

+ Multiple shortcuts for the same action can be separated by comma. + See Electron documentation for available modifiers and key codes. +

diff --git a/src/services/keyboard_actions.js b/src/services/keyboard_actions.js index 9e223d46b..d665692a9 100644 --- a/src/services/keyboard_actions.js +++ b/src/services/keyboard_actions.js @@ -215,13 +215,13 @@ const DEFAULT_KEYBOARD_ACTIONS = [ }, { actionName: "activateNextTab", - defaultShortcuts: isElectron ? ["CommandOrControl+Tab"] : [], + defaultShortcuts: isElectron ? ["CommandOrControl+Tab", "CommandOrControl+PageDown"] : [], description: "Activates tab on the right", scope: "window" }, { actionName: "activatePreviousTab", - defaultShortcuts: isElectron ? ["CommandOrControl+Shift+Tab"] : [], + defaultShortcuts: isElectron ? ["CommandOrControl+Shift+Tab", "CommandOrControl+PageUp"] : [], description: "Activates tab on the left", scope: "window" }, From 8ea3608bf1dd4b66e3f5c678d3b8f3e56b211005 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 29 Nov 2022 00:00:45 +0100 Subject: [PATCH 2/4] each stripped tag will be replace by a space, #3355 --- src/services/search/expressions/note_content_fulltext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/search/expressions/note_content_fulltext.js b/src/services/search/expressions/note_content_fulltext.js index 548578c2b..e6c182ed6 100644 --- a/src/services/search/expressions/note_content_fulltext.js +++ b/src/services/search/expressions/note_content_fulltext.js @@ -100,7 +100,7 @@ class NoteContentFulltextExp extends Expression { if (type === 'text' && mime === 'text/html') { if (!this.raw && content.length < 20000) { // striptags is slow for very large notes // allow link to preserve URLs: https://github.com/zadam/trilium/issues/2412 - content = striptags(content, ['a']); + content = striptags(content, ['a'], ' '); // at least the closing tag can be easily stripped content = content.replace(/<\/a>/ig, ""); From 36c98e919aa5d4bd7da0d4bbdb4d048ea12f53c8 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 1 Dec 2022 22:50:53 +0100 Subject: [PATCH 3/4] fix cursor jumping problem when having same note open in two tabs, closes #3365 --- src/public/app/widgets/note_detail.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.js index 7a6fff9ea..f7b124827 100644 --- a/src/public/app/widgets/note_detail.js +++ b/src/public/app/widgets/note_detail.js @@ -283,11 +283,15 @@ export default class NoteDetailWidget extends NoteContextAwareWidget { // probably incorrect event // calling this.refresh() is not enough since the event needs to be propagated to children as well // FIXME: create a separate event to force hierarchical refresh - this.triggerEvent('noteTypeMimeChanged', {noteId: this.noteId}); + + // this uses handleEvent to make sure that the ordinary content updates are propagated only in the subtree + // to avoid problem in #3365 + this.handleEvent('noteTypeMimeChanged', {noteId: this.noteId}); } else if (loadResults.isNoteReloaded(this.noteId, this.componentId) && (this.type !== await this.getWidgetType() || this.mime !== this.note.mime)) { + // this needs to have a triggerEvent so that e.g. note type (not in the component subtree) is updated this.triggerEvent('noteTypeMimeChanged', {noteId: this.noteId}); } else { @@ -304,6 +308,8 @@ export default class NoteDetailWidget extends NoteContextAwareWidget { && attributeService.isAffecting(attr, this.note)); if (label || relation) { + console.log("OOOO"); + // probably incorrect event // calling this.refresh() is not enough since the event needs to be propagated to children as well this.triggerEvent('noteTypeMimeChanged', {noteId: this.noteId}); From 0480f391d30f23e495b9917fbb6fa1f8efa68c39 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 1 Dec 2022 22:56:29 +0100 Subject: [PATCH 4/4] release 0.57.2 --- package.json | 2 +- src/services/build.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4cc9133e5..f3e24517c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.57.1-beta", + "version": "0.57.2", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/services/build.js b/src/services/build.js index 58c0c6adb..be85e9eea 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2022-11-20T23:43:38+01:00", buildRevision: "4001953fd76f5ed47f95b66b6089794071a1764a" }; +module.exports = { buildDate:"2022-12-01T22:56:29+01:00", buildRevision: "36c98e919aa5d4bd7da0d4bbdb4d048ea12f53c8" };