mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
handle navigation from main-extension's menu (Help -> Support)
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
6572fad1c8
commit
a868a98c55
3 files changed
+23
-13
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { LensMainExtension, Registry } from "@k8slens/extensions";
|
||||
import { LensMainExtension, Registry, windowManager } from "@k8slens/extensions";
|
||||
import { supportPageURL } from "./src/support.route";
|
||||
|
||||
export default class SupportPageMainExtension extends LensMainExtension {
|
||||
@@ -11,9 +11,11 @@ export default class SupportPageMainExtension extends LensMainExtension {
|
||||
registry.add({
|
||||
parentId: "help",
|
||||
label: "Support",
|
||||
async click() {
|
||||
// fixme: require runtime windowManager (ensureMainWindow + navigate for main)
|
||||
console.log(`navigate: ${supportPageURL()}`);
|
||||
click() {
|
||||
windowManager.navigate({
|
||||
channel: "menu:navigate", // fixme: use windowManager.ensureMainWindow from Tray's PR
|
||||
url: supportPageURL(),
|
||||
});
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user