mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove usage of deprecated xtermjs's registerLinkMatcher API (#5996)
* Make openBrowser->openLinkInBrowser injectable Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove use of deprecated link matcher API from XtermJS Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
5c11d7f7fe
commit
09f2919946
17 files changed
+144
-77
No files matched your search
@@ -5,7 +5,6 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { docsUrl, productName, supportUrl } from "../../common/vars";
|
||||
import { broadcastMessage } from "../../common/ipc";
|
||||
import { openBrowser } from "../../common/utils";
|
||||
import type { MenuItemConstructorOptions } from "electron";
|
||||
import { webContents } from "electron";
|
||||
import loggerInjectable from "../../common/logger.injectable";
|
||||
@@ -25,6 +24,7 @@ import applicationWindowInjectable from "../start-main-application/lens-window/a
|
||||
import reloadWindowInjectable from "../start-main-application/lens-window/reload-window.injectable";
|
||||
import showApplicationWindowInjectable from "../start-main-application/lens-window/show-application-window.injectable";
|
||||
import processCheckingForUpdatesInjectable from "../application-update/check-for-updates/process-checking-for-updates.injectable";
|
||||
import openLinkInBrowserInjectable from "../../common/utils/open-link-in-browser.injectable";
|
||||
|
||||
function ignoreIf(check: boolean, menuItems: MenuItemOpts[]) {
|
||||
return check ? [] : menuItems;
|
||||
@@ -54,6 +54,7 @@ const applicationMenuItemsInjectable = getInjectable({
|
||||
const navigateToAddCluster = di.inject(navigateToAddClusterInjectable);
|
||||
const stopServicesAndExitApp = di.inject(stopServicesAndExitAppInjectable);
|
||||
const processCheckingForUpdates = di.inject(processCheckingForUpdatesInjectable);
|
||||
const openLinkInBrowser = di.inject(openLinkInBrowserInjectable);
|
||||
|
||||
logger.info(`[MENU]: autoUpdateEnabled=${updatingIsEnabled}`);
|
||||
|
||||
@@ -260,7 +261,7 @@ const applicationMenuItemsInjectable = getInjectable({
|
||||
label: "Documentation",
|
||||
id: "documentation",
|
||||
click: async () => {
|
||||
openBrowser(docsUrl).catch((error) => {
|
||||
openLinkInBrowser(docsUrl).catch((error) => {
|
||||
logger.error("[MENU]: failed to open browser", { error });
|
||||
});
|
||||
},
|
||||
@@ -269,7 +270,7 @@ const applicationMenuItemsInjectable = getInjectable({
|
||||
label: "Support",
|
||||
id: "support",
|
||||
click: async () => {
|
||||
openBrowser(supportUrl).catch((error) => {
|
||||
openLinkInBrowser(supportUrl).catch((error) => {
|
||||
logger.error("[MENU]: failed to open browser", { error });
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user