mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
backend API to create a launcher
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import BasicWidget from "./basic_widget.js";
|
||||
import contextMenu from "../menus/context_menu.js";
|
||||
import appContext from "../components/app_context.js";
|
||||
|
||||
const TPL = `<div class="spacer"></div>`;
|
||||
|
||||
@@ -15,5 +17,20 @@ export default class SpacerWidget extends BasicWidget {
|
||||
this.$widget.css("flex-basis", this.baseSize);
|
||||
this.$widget.css("flex-grow", this.growthFactor);
|
||||
this.$widget.css("flex-shrink", 1000);
|
||||
|
||||
this.$widget.on("contextmenu", e => {
|
||||
this.$widget.tooltip("hide");
|
||||
|
||||
contextMenu.show({
|
||||
x: e.pageX,
|
||||
y: e.pageY,
|
||||
items: [
|
||||
{title: "Configure Launchbar", command: "showLaunchBarSubtree", uiIcon: "bx bx-sidebar"}
|
||||
],
|
||||
selectMenuItemHandler: ({command}) => {
|
||||
appContext.triggerCommand(command);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user