Skip to content

Build your personal knowledge base with Trilium Notes

feat(server): mark bookmarks as internal links

Elian Doran84fff307230f
diff --git a/apps/client/src/entities/fattribute.ts b/apps/client/src/entities/fattribute.ts
index 07a2b22c4f..bdccead31d 100644
--- a/apps/client/src/entities/fattribute.ts
+++ b/apps/client/src/entities/fattribute.ts
@@ -66,7 +66,15 @@ class FAttribute {
}
get isAutoLink() {
- return this.type === "relation" && ["internalLink", "imageLink", "relationMapLink", "includeNoteLink"].includes(this.name);
+ if (this.type === "relation") {
+ return ["internalLink", "imageLink", "relationMapLink", "includeNoteLink"].includes(this.name);
+ }
+
+ if (this.type === "label") {
+ return this.name === "internalBookmark";
+ }
+
+ return false;
}
get toString() {
diff --git a/apps/server/src/services/attributes.ts b/apps/server/src/services/attributes.ts
index 2e1a207447..c9642d4777 100644
--- a/apps/server/src/services/attributes.ts
+++ b/apps/server/src/services/attributes.ts
@@ -77,7 +77,7 @@ function getAttributeNames(type: string, nameLike: string) {
}
}
- names = names.filter((name) => !["internalLink", "imageLink", "includeNoteLink", "relationMapLink"].includes(name));
+ names = names.filter((name) => !["internalLink", "imageLink", "includeNoteLink", "relationMapLink", "internalBookmark"].includes(name));
names.sort((a, b) => {
const aPrefix = a.toLowerCase().startsWith(nameLike);