mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
refresh button state change on note update
This commit is contained in:
@@ -20,7 +20,13 @@ export default class RunScriptButtonsWidget extends TabAwareWidget {
|
||||
}
|
||||
|
||||
refreshWithNote(note) {
|
||||
this.$renderButton.toggle(note.type === 'render');
|
||||
this.$renderButton.toggle(note.type === 'render');console.log("note.mime", note.mime);
|
||||
this.$executeScriptButton.toggle(note.mime.startsWith('application/javascript'));
|
||||
}
|
||||
|
||||
async entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.isNoteReloaded(this.noteId)) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user