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:
parent
9cda855038
commit
b2d9538d85
@ -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")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -11,4 +11,4 @@ export * from "./getRandId"
|
||||
export * from "./splitArray"
|
||||
export * from "./saveToAppFiles"
|
||||
export * from "./singleton"
|
||||
export * from "./cloneJson"
|
||||
export * from "./openExternal"
|
||||
|
||||
6
src/common/utils/openExternal.ts
Normal file
6
src/common/utils/openExternal.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// Opens a link in external browser
|
||||
import { shell } from "electron"
|
||||
|
||||
export function openExternal(url: string) {
|
||||
return shell.openExternal(url);
|
||||
}
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user