mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
support-page extension -- menu-registry / part 1
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
ef66f67b39
commit
b853d1d54b
5 files changed
+54
-21
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { LensMainExtension, Registry } from "@lens/extensions";
|
||||
import { supportPageURL } from "./src/support.route";
|
||||
|
||||
export default class SupportPageMainExtension extends LensMainExtension {
|
||||
async onActivate() {
|
||||
@@ -6,6 +7,15 @@ export default class SupportPageMainExtension extends LensMainExtension {
|
||||
}
|
||||
|
||||
async registerAppMenus(registry: Registry.MenuRegistry) {
|
||||
// TODO: allow to modify global menu item "Help -> Support"
|
||||
this.disposers.push(
|
||||
registry.add({
|
||||
parentId: "help",
|
||||
label: "Support",
|
||||
async click() {
|
||||
// fixme: require runtime windowManager (ensureMainWindow + navigate for main)
|
||||
console.log(`navigate: ${supportPageURL()}`);
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user