Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
add missing canvas-note entries in helper functions
Tom Freea894c19c2b6c
diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.jsindex 836755566c..e8bb1de424 100644--- a/src/public/app/entities/note_short.js+++ b/src/public/app/entities/note_short.js@@ -16,7 +16,8 @@ const NOTE_TYPE_ICONS = {"relation-map": "bx bx-map-alt","book": "bx bx-book","note-map": "bx bx-map-alt",- "mermaid": "bx bx-selection"+ "mermaid": "bx bx-selection",+ "canvas-note": "bx bx-pen"};/**diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.jsindex dea6665150..be61f6bc3c 100644--- a/src/public/app/widgets/note_detail.js+++ b/src/public/app/widgets/note_detail.js@@ -10,6 +10,7 @@ import FileTypeWidget from "./type_widgets/file.js";import ImageTypeWidget from "./type_widgets/image.js";import RenderTypeWidget from "./type_widgets/render.js";import RelationMapTypeWidget from "./type_widgets/relation_map.js";+import CanvasNoteTypeWidget from "./type_widgets/canvas_note.js";import ProtectedSessionTypeWidget from "./type_widgets/protected_session.js";import BookTypeWidget from "./type_widgets/book.js";import appContext from "../services/app_context.js";@@ -50,6 +51,7 @@ const typeWidgetClasses = {'search': NoneTypeWidget,'render': RenderTypeWidget,'relation-map': RelationMapTypeWidget,+ 'canvas-note': CanvasNoteTypeWidget,'protected-session': ProtectedSessionTypeWidget,'book': BookTypeWidget,'note-map': NoteMapTypeWidgetdiff --git a/src/public/app/widgets/note_type.js b/src/public/app/widgets/note_type.jsindex a81e446e3f..111b96e6aa 100644--- a/src/public/app/widgets/note_type.js+++ b/src/public/app/widgets/note_type.js@@ -11,6 +11,7 @@ const NOTE_TYPES = [{ type: "text", mime: "text/html", title: "Text", selectable: true },{ type: "relation-map", mime: "application/json", title: "Relation Map", selectable: true },{ type: "render", mime: '', title: "Render Note", selectable: true },+ { type: "canvas-note", mime: 'application/json', title: "Canvas Note", selectable: true },{ type: "book", mime: '', title: "Book", selectable: true },{ type: "mermaid", mime: 'text/mermaid', title: "Mermaid Diagram", selectable: true },{ type: "code", mime: 'text/plain', title: "Code", selectable: true }diff --git a/src/routes/api/notes.js b/src/routes/api/notes.jsindex 29f0e3508a..f602189e21 100644--- a/src/routes/api/notes.js+++ b/src/routes/api/notes.js@@ -217,8 +217,6 @@ function changeTitle(req) {noteService.triggerNoteTitleChanged(note);}- console.log(note, await note.getContent());-return note;}