Skip to content

Commit

Permalink
share: Render mind map
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Sep 1, 2024
1 parent 1437df7 commit 5c2446b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/share/content_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function getContent(note: SNote) {
renderCode(result);
} else if (note.type === 'mermaid') {
renderMermaid(result, note);
} else if (note.type === 'image' || note.type === 'canvas') {
} else if ([ "image", "canvas", "mindMap"].includes(note.type)) {
renderImage(result, note);
} else if (note.type === 'file') {
renderFile(note, result);
Expand Down
2 changes: 2 additions & 0 deletions src/share/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ function register(router: Router) {
renderImageAttachment(image, res, 'canvas-export.svg');
} else if (image.type === 'mermaid') {
renderImageAttachment(image, res, 'mermaid-export.svg');
} else if (image.type === "mindMap") {
renderImageAttachment(image, res, 'mindmap-export.svg');
} else {
return res.status(400)
.json({ message: "Requested note is not a shareable image" });
Expand Down

0 comments on commit 5c2446b

Please sign in to comment.