mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 01:48:32 +02:00
refresh button state change on note update
This commit is contained in:
parent
3b268cc8eb
commit
7f2755d4a0
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user