mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 16:55:50 +01:00
Merge branch 'master' into next55
# Conflicts: # electron.js # package-lock.json # package.json # src/public/app/layouts/desktop_layout.js # src/public/app/widgets/note_tree.js # src/services/port.js
This commit is contained in:
@@ -207,6 +207,7 @@ const ATTR_HELP = {
|
||||
"workspaceIconClass": "defines box icon CSS class which will be used in tab when hoisted to this note",
|
||||
"workspaceTabBackgroundColor": "CSS color used in the note tab when hoisted to this note",
|
||||
"workspaceCalendarRoot": "Defines per-workspace calendar root",
|
||||
"workspaceTemplate": "This note will appear in the selection of available template when creating new note, but only when hoisted into a workspace containing this template",
|
||||
"searchHome": "new search notes will be created as children of this note",
|
||||
"hoistedSearchHome": "new search notes will be created as children of this note when hoisted to some ancestor of this note",
|
||||
"inbox": "default inbox location for new notes",
|
||||
@@ -218,6 +219,7 @@ const ATTR_HELP = {
|
||||
"shareAlias": "define an alias using which the note will be available under https://your_trilium_host/share/[your_alias]",
|
||||
"shareOmitDefaultCss": "default share page CSS will be omitted. Use when you make extensive styling changes.",
|
||||
"shareRoot": "marks note which is served on /share root.",
|
||||
"shareDescription": "define text to be added to the HTML meta tag for description",
|
||||
"shareRaw": "note will be served in its raw format, without HTML wrapper",
|
||||
"shareDisallowRobotIndexing": `will forbid robot indexing of this note via <code>X-Robots-Tag: noindex</code> header`,
|
||||
"shareCredentials": "require credentials to access this shared note. Value is expected to be in format 'username:password'. Don't forget to make this inheritable to apply to child-notes/images.",
|
||||
@@ -233,7 +235,9 @@ const ATTR_HELP = {
|
||||
|
||||
See <a href="https://github.com/zadam/trilium/wiki/Default-note-title">wiki with details</a>, API docs for <a href="https://zadam.github.io/trilium/backend_api/Note.html">parentNote</a> and <a href="https://day.js.org/docs/en/display/format">now</a> for details.`,
|
||||
"template": "This note will appear in the selection of available template when creating new note",
|
||||
"toc": "<code>#toc</code> or <code>#toc=show</code> will force the Table of Contents to be shown, <code>#toc=hide</code> will force hiding it. If the label doesn't exist, the global setting is observed"
|
||||
"toc": "<code>#toc</code> or <code>#toc=show</code> will force the Table of Contents to be shown, <code>#toc=hide</code> will force hiding it. If the label doesn't exist, the global setting is observed",
|
||||
"color": "defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f",
|
||||
"keyboardShortcut": "Defines a keyboard shortcut which will immediately jump to this note. Example: 'ctrl+alt+e'. Requires frontend reload for the change to take effect."
|
||||
},
|
||||
"relation": {
|
||||
"runOnNoteCreation": "executes when note is created on backend",
|
||||
|
||||
@@ -57,8 +57,10 @@ const TPL = `
|
||||
}
|
||||
|
||||
.add-new-attribute-button:hover, .save-attributes-button:hover {
|
||||
border: 1px solid var(--main-border-color);
|
||||
border-radius: 2px;
|
||||
border: 1px solid var(--button-border-color);
|
||||
border-radius: var(--button-border-radius);
|
||||
background: var(--button-background-color);
|
||||
color: var(--button-text-color);
|
||||
}
|
||||
|
||||
.attribute-errors {
|
||||
@@ -297,6 +299,12 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
async save() {
|
||||
if (this.lastUpdatedNoteId !== this.noteId) {
|
||||
// https://github.com/zadam/trilium/issues/3090
|
||||
console.warn("Ignoring blur event because a different note is loaded.");
|
||||
return;
|
||||
}
|
||||
|
||||
const attributes = this.parseAttributes();
|
||||
|
||||
if (attributes) {
|
||||
@@ -354,6 +362,8 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
dataChanged() {
|
||||
this.lastUpdatedNoteId = this.noteId;
|
||||
|
||||
if (this.lastSavedContent === this.textEditor.getData()) {
|
||||
this.$saveAttributesButton.fadeOut();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user