This commit is contained in:
Vanessa 2023-05-16 00:04:25 +08:00
parent fdf9f0d9e4
commit 1ac623ebb1
5 changed files with 79 additions and 17 deletions

View file

@ -14,6 +14,7 @@ export class Plugin {
public eventBus: EventBus;
public data: any;
public name: string;
public topBarIcons: Element[] = [];
public models: {
/// #if !MOBILE
[key: string]: (options: { tab: Tab, data: any }) => Custom
@ -65,6 +66,7 @@ export class Plugin {
iconElement.addEventListener("click", options.callback);
document.querySelector("#" + (options.position === "right" ? "barSearch" : "drag")).before(iconElement);
}
this.topBarIcons.push(iconElement);
return iconElement;
}