mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
feat(mermaid): hide layout switcher if in readonly mode
This commit is contained in:
parent
3bbb2c3e80
commit
b777e916c4
@ -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";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user