feat(mindmap): read-only mode

This commit is contained in:
Elian Doran
2025-09-25 19:12:37 +03:00
parent 5bfa0d13e3
commit 4381399978
2 changed files with 12 additions and 6 deletions

View File

@@ -91,7 +91,7 @@ function SwitchSplitOrientationButton({ note, isReadOnly, isDefaultViewMode }: F
function ToggleReadOnlyButton({ note, viewType, isDefaultViewMode }: FloatingButtonContext) {
const [ isReadOnly, setReadOnly ] = useNoteLabelBoolean(note, "readOnly");
const isEnabled = (note.type === "mermaid" || viewType === "geoMap")
const isEnabled = ([ "mermaid", "mindMap" ].includes(note.type) || viewType === "geoMap")
&& note.isContentAvailable() && isDefaultViewMode;
return isEnabled && <FloatingButton