mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
launcher improvements
This commit is contained in:
17
src/public/app/widgets/buttons/launcher/script_launcher.js
Normal file
17
src/public/app/widgets/buttons/launcher/script_launcher.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import AbstractLauncher from "./abstract_launcher.js";
|
||||
|
||||
export default class ScriptLauncher extends AbstractLauncher {
|
||||
constructor(launcherNote) {
|
||||
super(launcherNote);
|
||||
|
||||
this.title(this.launcherNote.title)
|
||||
.icon(this.launcherNote.getIcon())
|
||||
.onClick(this.handler);
|
||||
}
|
||||
|
||||
async launch() {
|
||||
const script = await this.launcherNote.getRelationTarget('script');
|
||||
|
||||
await script.executeScript();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user