diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.js index 836755566..e8bb1de42 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.js index dea666515..be61f6bc3 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': NoteMapTypeWidget diff --git a/src/public/app/widgets/note_type.js b/src/public/app/widgets/note_type.js index a81e446e3..111b96e6a 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.js index 29f0e3508..f602189e2 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; }