diff --git a/src/public/app/entities/fnote.js b/src/public/app/entities/fnote.js index 46befda8e..60acdbf29 100644 --- a/src/public/app/entities/fnote.js +++ b/src/public/app/entities/fnote.js @@ -22,7 +22,8 @@ const NOTE_TYPE_ICONS = { "webView": "bx bx-globe-alt", "launcher": "bx bx-link", "doc": "bx bxs-file-doc", - "contentWidget": "bx bxs-widget" + "contentWidget": "bx bxs-widget", + "mindMap": "bx bx-sitemap" }; /** diff --git a/src/public/app/services/note_types.js b/src/public/app/services/note_types.js index 40bc4a88b..73314245d 100644 --- a/src/public/app/services/note_types.js +++ b/src/public/app/services/note_types.js @@ -13,6 +13,7 @@ async function getNoteTypeItems(command) { { title: "Mermaid Diagram", command: command, type: "mermaid", uiIcon: "bx bx-selection" }, { title: "Canvas", command: command, type: "canvas", uiIcon: "bx bx-pen" }, { title: "Web View", command: command, type: "webView", uiIcon: "bx bx-globe-alt" }, + { title: "Mind Map", command, type: "mindMap", uiIcon: "bx bx-sitemap" } ]; const templateNoteIds = await server.get("search-templates"); diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.js index ea081cd1e..5b029fa14 100644 --- a/src/public/app/widgets/note_detail.js +++ b/src/public/app/widgets/note_detail.js @@ -28,6 +28,7 @@ import DocTypeWidget from "./type_widgets/doc.js"; import ContentWidgetTypeWidget from "./type_widgets/content_widget.js"; import AttachmentListTypeWidget from "./type_widgets/attachment_list.js"; import AttachmentDetailTypeWidget from "./type_widgets/attachment_detail.js"; +import MindMapWidget from "./type_widgets/mind_map.js"; const TPL = `
Hello
"); + this.$widget.show(); + } + + cleanup() { + this.$widget.empty(); + } + + async entitiesReloadedEvent({loadResults}) { + if (loadResults.isNoteReloaded(this.noteId)) { + this.refresh(); + } + } +} \ No newline at end of file diff --git a/src/services/note_types.ts b/src/services/note_types.ts index 3828241bd..62121b12c 100644 --- a/src/services/note_types.ts +++ b/src/services/note_types.ts @@ -13,7 +13,8 @@ const noteTypes = [ { type: 'webView', defaultMime: '' }, { type: 'launcher', defaultMime: '' }, { type: 'doc', defaultMime: '' }, - { type: 'contentWidget', defaultMime: '' } + { type: 'contentWidget', defaultMime: '' }, + { type: 'mindMap', defaultMime: 'application/json' } ]; function getDefaultMimeForNoteType(typeName: string) {