don't display mermaid if the note is encrypted without protected session

This commit is contained in:
zadam
2022-07-28 23:59:41 +02:00
parent 6d990de450
commit ef6b7a85d5
4 changed files with 13 additions and 2 deletions

View File

@@ -16,6 +16,10 @@ const TPL = `
z-index: 100;
}
.floating-buttons-children > * {
margin-left: 10px;
}
.floating-buttons .floating-button {
font-size: 130%;
padding: 5px 10px 4px 10px;

View File

@@ -33,7 +33,9 @@ let idCounter = 1;
export default class MermaidWidget extends NoteContextAwareWidget {
isEnabled() {
return super.isEnabled() && this.note && this.note.type === 'mermaid';
return super.isEnabled()
&& this.note?.type === 'mermaid'
&& this.note.isContentAvailable();
}
doRender() {