1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix: expose Util.openExternal via extensions-api

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-10-30 10:51:12 +02:00
parent 9cda855038
commit b2d9538d85
4 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,4 @@
import { LensMainExtension } from "@k8slens/extensions";
import { shell } from "electron";
import { LensMainExtension, Util } from "@k8slens/extensions";
export default class LicenseLensMainExtension extends LensMainExtension {
appMenus = [
@ -7,7 +6,7 @@ export default class LicenseLensMainExtension extends LensMainExtension {
parentId: "help",
label: "License",
async click() {
shell.openExternal("https://k8slens.dev/licenses/eula.md");
Util.openExternal("https://k8slens.dev/licenses/eula.md")
}
}
]

View File

@ -11,4 +11,4 @@ export * from "./getRandId"
export * from "./splitArray"
export * from "./saveToAppFiles"
export * from "./singleton"
export * from "./cloneJson"
export * from "./openExternal"

View File

@ -0,0 +1,6 @@
// Opens a link in external browser
import { shell } from "electron"
export function openExternal(url: string) {
return shell.openExternal(url);
}

View File

@ -1,3 +1,3 @@
export { Singleton } from "../../common/utils"
export { Singleton, openExternal } from "../../common/utils"
export { prevDefault, stopPropagation } from "../../renderer/utils/prevDefault"
export { cssNames } from "../../renderer/utils/cssNames"