mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
api log capture WIP
This commit is contained in:
parent
135064a18f
commit
3663d56917
26
src/public/app/widgets/script_log.js
Normal file
26
src/public/app/widgets/script_log.js
Normal file
@ -0,0 +1,26 @@
|
||||
import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="script-log-widget">
|
||||
<style>
|
||||
.script-log-widget {
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="script-log-container"></div>
|
||||
</div>`;
|
||||
|
||||
export default class ScriptLogWidget extends NoteContextAwareWidget {
|
||||
isEnabled() {
|
||||
return this.note
|
||||
&& this.note.mime.startsWith('application/javascript;env=')
|
||||
&& super.isEnabled();
|
||||
}
|
||||
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
|
||||
this.$logContainer = this.$widget.find('.script-log-container');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user