mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 00:02:28 +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()
|
return super.isEnabled()
|
||||||
&& ["mermaid"].includes(this.note?.type ?? "")
|
&& ["mermaid"].includes(this.note?.type ?? "")
|
||||||
&& this.note?.isContentAvailable()
|
&& this.note?.isContentAvailable()
|
||||||
|
&& !this.note?.hasLabel("readOnly")
|
||||||
&& this.noteContext?.viewScope?.viewMode === "default";
|
&& this.noteContext?.viewScope?.viewMode === "default";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user