From e736c5a116efd3ddda9721b1a20c714c5e28cf61 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Fri, 9 Jun 2023 09:17:52 +0200 Subject: [PATCH] Open Docker links in default browser --- .../InstallationWizard/InstallStep/index.tsx | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/components/InstallationWizard/InstallStep/index.tsx b/src/components/InstallationWizard/InstallStep/index.tsx index b1e2b6131..f53ce1515 100644 --- a/src/components/InstallationWizard/InstallStep/index.tsx +++ b/src/components/InstallationWizard/InstallStep/index.tsx @@ -57,6 +57,15 @@ export const InstallStep = (props: InstallStepProps) => { setSelectedDockerComposeOSTab(tabIndex); }; + const openLinkInDefaultBrowser = (url: string) => { + window.sendMessageToDigma({ + action: globalActions.OPEN_URL_IN_DEFAULT_BROWSER, + payload: { + url + } + }); + }; + const dockerComposeOSTabs = [ { title: "Linux & macOS", @@ -90,11 +99,7 @@ export const InstallStep = (props: InstallStepProps) => { (You'll need{" "} - + openLinkInDefaultBrowser(DOCKER_DESKTOP_URL)}> Docker Desktop {" "} 4.10.0 or later installed) @@ -119,19 +124,11 @@ export const InstallStep = (props: InstallStepProps) => { (You'll need{" "} - + openLinkInDefaultBrowser(DOCKER_URL)}> Docker {" "} and{" "} - + openLinkInDefaultBrowser(DOCKER_COMPOSE_URL)}> Docker Compose {" "} installed)