mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
register status-bar element, base class for extension's registry
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
59ca12ff31
commit
6572fad1c8
11 files changed
+85
-77
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { LensRendererExtension, Registry } from "@k8slens/extensions";
|
||||
import { Support } from "./src/support";
|
||||
import React from "react";
|
||||
import { Component, LensRendererExtension, Navigation, Registry } from "@k8slens/extensions";
|
||||
import { supportPageRoute, supportPageURL } from "./src/support.route";
|
||||
import { Support } from "./src/support";
|
||||
|
||||
export default class SupportPageRendererExtension extends LensRendererExtension {
|
||||
async onActivate() {
|
||||
@@ -19,4 +20,18 @@ export default class SupportPageRendererExtension extends LensRendererExtension
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
registerStatusBarIcon(registry: Registry.StatusBarRegistry) {
|
||||
this.disposers.push(
|
||||
registry.add({
|
||||
icon: (
|
||||
<Component.Icon
|
||||
material="support"
|
||||
tooltip="Support"
|
||||
onClick={() => Navigation.navigate(supportPageURL())}
|
||||
/>
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user