Merge remote-tracking branch 'origin/master' into next58

This commit is contained in:
zadam 2022-12-02 15:28:04 +01:00
commit 7b36709e18
6 changed files with 16 additions and 7 deletions

View File

@ -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": {

View File

@ -7,7 +7,10 @@ const TPL = `
<div class="options-section">
<h4>Keyboard shortcuts</h4>
<p>Multiple shortcuts for the same action can be separated by comma.</p>
<p>
Multiple shortcuts for the same action can be separated by comma.
See <a href="https://www.electronjs.org/docs/latest/api/accelerator">Electron documentation</a> for available modifiers and key codes.
</p>
<div class="form-group">
<input type="text" class="form-control" id="keyboard-shortcut-filter" placeholder="Type text to filter shortcuts...">

View File

@ -289,11 +289,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 {
@ -310,6 +314,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});

View File

@ -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" };

View File

@ -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"
},

View File

@ -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, "");