Skip to content

Build your personal knowledge base with Trilium Notes

Merge remote-tracking branch 'origin/develop' into feature/rtl

Elian Doran1976fe6729f8
diff --cc src/public/app/widgets/note_title.ts
index 56ff574722,841175efd1..690c186851
--- a/src/public/app/widgets/note_title.ts
+++ b/src/public/app/widgets/note_title.ts
@@@ -89,12 -89,9 +89,12 @@@ export default class NoteTitleWidget ex
}
async refreshWithNote(note: FNote) {
- const isReadOnly = (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable()) || utils.isLaunchBarConfig(note.noteId) || this.noteContext?.viewScope?.viewMode !== "default";
+ const isReadOnly =
+ (note.isProtected && !protectedSessionHolder.isProtectedSessionAvailable())
+ || utils.isLaunchBarConfig(note.noteId)
+ || this.noteContext?.viewScope?.viewMode !== "default";
- this.$noteTitle.val(isReadOnly ? await this.noteContext?.getNavigationTitle() || "" : note.title);
+ this.$noteTitle.val(isReadOnly ? (await this.noteContext?.getNavigationTitle()) || "" : note.title);
this.$noteTitle.prop("readonly", isReadOnly);
this.setProtectedStatus(note);
diff --cc src/public/app/widgets/view_widgets/calendar_view.ts
index fbc093ce51,ebec32a2e9..14f20b60e1
--- a/src/public/app/widgets/view_widgets/calendar_view.ts
+++ b/src/public/app/widgets/view_widgets/calendar_view.ts
@@@ -432,9 -432,23 +432,9 @@@ export default class CalendarView exten
}
}
- return [ note.title ];
+ return [note.title];
}
- static async #setAttribute(note: FNote, type: "label" | "relation", name: string, value: string | null | undefined) {
- if (value) {
- // Create or update the attribute.
- await server.put(`notes/${note.noteId}/set-attribute`, { type, name, value });
- } else {
- // Remove the attribute if it exists on the server but we don't define a value for it.
- const attributeId = note.getAttribute(type, name)?.attributeId;
- if (attributeId) {
- await server.remove(`notes/${note.noteId}/attributes/${attributeId}`);
- }
- }
- await ws.waitForMaxKnownEntityChangeId();
- }
-
static #formatDateToLocalISO(date: Date | null | undefined) {
if (!date) {
return undefined;