From daf41804d44d4a737e4f9b8d1e90de2ac41a3073 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 12 Jan 2026 21:43:57 +0200 Subject: [PATCH] chore(core): address requested changes --- .../src/widgets/attribute_widgets/UserAttributesList.tsx | 2 +- apps/server/package.json | 6 +++--- packages/trilium-core/src/becca/entities/bnote.ts | 2 +- packages/trilium-core/src/services/log.ts | 4 ++-- packages/trilium-core/src/services/notes.ts | 2 +- packages/trilium-core/src/services/options_init.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/client/src/widgets/attribute_widgets/UserAttributesList.tsx b/apps/client/src/widgets/attribute_widgets/UserAttributesList.tsx index 93ed5356c..a95887b7a 100644 --- a/apps/client/src/widgets/attribute_widgets/UserAttributesList.tsx +++ b/apps/client/src/widgets/attribute_widgets/UserAttributesList.tsx @@ -48,7 +48,7 @@ function useNoteAttributesWithDefinitions(note: FNote, attributesToIgnore: stri } function UserAttribute({ attr, children, style }: { attr: AttributeWithDefinitions, children: ComponentChildren, style?: CSSProperties }) { - const className = `${attr.type === "label" ? `label` + ` ${ attr.def.labelType}` : "relation"}`; + const className = attr.type === "label" ? `label ${attr.def.labelType}` : "relation"; return ( diff --git a/apps/server/package.json b/apps/server/package.json index daa44d3c8..841645dd6 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -110,7 +110,7 @@ "openai": "6.16.0", "rand-token": "1.0.1", "safe-compare": "1.1.4", - "sax": "1.4.3", + "sax": "1.4.4", "serve-favicon": "2.5.1", "stream-throttle": "0.1.3", "strip-bom": "5.0.0", @@ -120,8 +120,8 @@ "time2fa": "1.4.2", "tmp": "0.2.5", "turndown": "7.2.2", - "vite": "7.3.0", - "ws": "8.18.3", + "vite": "7.3.1", + "ws": "8.19.0", "xml2js": "0.6.2", "yauzl": "3.2.0" } diff --git a/packages/trilium-core/src/becca/entities/bnote.ts b/packages/trilium-core/src/becca/entities/bnote.ts index ad97d93fb..7be573166 100644 --- a/packages/trilium-core/src/becca/entities/bnote.ts +++ b/packages/trilium-core/src/becca/entities/bnote.ts @@ -1602,7 +1602,7 @@ class BNote extends AbstractBeccaEntity { // Limit the number of Snapshots to revisionSnapshotNumberLimit // Delete older Snapshots that exceed the limit eraseExcessRevisionSnapshots() { - // lable has a higher priority + // label has a higher priority let revisionSnapshotNumberLimit = parseInt(this.getLabelValue("versioningLimit") ?? ""); if (!Number.isInteger(revisionSnapshotNumberLimit)) { revisionSnapshotNumberLimit = parseInt(optionService.getOption("revisionSnapshotNumberLimit")); diff --git a/packages/trilium-core/src/services/log.ts b/packages/trilium-core/src/services/log.ts index 540cdc87a..686d497ad 100644 --- a/packages/trilium-core/src/services/log.ts +++ b/packages/trilium-core/src/services/log.ts @@ -5,11 +5,11 @@ export default class LogService { } info(message: string | Error) { - this.log(message); + console.info(message); } error(message: string | Error | unknown) { - this.log(`ERROR: ${message}`); + console.error("ERROR: ", message); } } diff --git a/packages/trilium-core/src/services/notes.ts b/packages/trilium-core/src/services/notes.ts index d1b908fdf..a62a8e7d5 100644 --- a/packages/trilium-core/src/services/notes.ts +++ b/packages/trilium-core/src/services/notes.ts @@ -553,7 +553,7 @@ async function downloadImage(noteId: string, imageUrl: string) { if (attachment.attachmentId) { imageUrlToAttachmentIdMapping[imageUrl] = attachment.attachmentId; } else { - log.error(`Download of '${imageUrl}' due to no attachment ID.`); + log.error(`Download of '${imageUrl}' for note '${noteId}' failed due to no attachment ID.`); } log.info(`Download of '${imageUrl}' succeeded and was saved as image attachment '${attachment.attachmentId}' of note '${noteId}'`); diff --git a/packages/trilium-core/src/services/options_init.ts b/packages/trilium-core/src/services/options_init.ts index 9b9ed9099..3e605711d 100644 --- a/packages/trilium-core/src/services/options_init.ts +++ b/packages/trilium-core/src/services/options_init.ts @@ -28,7 +28,7 @@ interface DefaultOption { /** * The value to initialize the option with, if the option is not already present in the database. * - * If a function is passed Gin instead, the function is called if the option does not exist (with access to the current options) and the return value is used instead. Useful to migrate a new option with a value depending on some other option that might be initialized. + * If a function is passed in instead, the function is called if the option does not exist (with access to the current options) and the return value is used instead. Useful to migrate a new option with a value depending on some other option that might be initialized. */ value: string | ((options: OptionMap) => string); isSynced: boolean;