Get rid of this.disposers while registering stuff in extensions (#1148)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman authored and GitHub committed 2020-10-27 17:07:21 +02:00
1 parent b765ee11bb
commit 67754ffbb9
15 files changed
+141 -197

No files matched your search

+10 -16
View File
@@ -1,20 +1,14 @@
import { LensMainExtension, Registry, windowManager } from "@k8slens/extensions";
import { LensMainExtension, windowManager } from "@k8slens/extensions";
import { supportPageURL } from "./src/support.route";
export default class SupportPageMainExtension extends LensMainExtension {
async onActivate() {
console.log("support page extension activated")
}
async registerAppMenus(registry: Registry.MenuRegistry) {
this.disposers.push(
registry.add({
parentId: "help",
label: "Support",
click() {
windowManager.navigate(supportPageURL());
}
})
)
}
appMenus = [
{
parentId: "help",
label: "Support",
click() {
windowManager.navigate(supportPageURL());
}
}
]
}