mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 14:55:50 +01:00
don't display mermaid if the note is encrypted without protected session
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user