feat(mermaid): hide layout switcher if in readonly mode

This commit is contained in:
Elian Doran 2025-03-22 14:10:38 +02:00
parent 3bbb2c3e80
commit b777e916c4
No known key found for this signature in database

View File

@ -15,6 +15,7 @@ export default class SwitchSplitOrientationButton extends NoteContextAwareWidget
return super.isEnabled()
&& ["mermaid"].includes(this.note?.type ?? "")
&& this.note?.isContentAvailable()
&& !this.note?.hasLabel("readOnly")
&& this.noteContext?.viewScope?.viewMode === "default";
}