From cb5fe52ec6cce6382ebc37ad5d096e5e89afbf25 Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Wed, 22 Sep 2021 12:03:16 +1000 Subject: [PATCH] add Run on Google Cloud button to settings, setup --- .../Settings/ProjectSettings/RowyRun.tsx | 45 ++++++++++++------- src/components/Setup/Step1RowyRun.tsx | 19 +++++--- src/constants/externalLinks.ts | 2 + src/pages/Deploy.tsx | 4 +- 4 files changed, 47 insertions(+), 23 deletions(-) diff --git a/src/components/Settings/ProjectSettings/RowyRun.tsx b/src/components/Settings/ProjectSettings/RowyRun.tsx index 1619a1f5..49dc7d23 100644 --- a/src/components/Settings/ProjectSettings/RowyRun.tsx +++ b/src/components/Settings/ProjectSettings/RowyRun.tsx @@ -121,21 +121,36 @@ export default function RowyRun({ setLatestUpdate(null); }, [latestUpdate, setLatestUpdate, version]); - const deployButton = window.location.hostname.includes("rowy.app") ? ( - - One-Click Deploy - + const deployButton = window.location.hostname.includes( + EXTERNAL_LINKS.rowyAppHostName + ) ? ( + settings.rowyRunDeployStatus === "BUILDING" || + settings.rowyRunDeployStatus === "COMPLETE" ? ( + + Run on Google Cloud + + ) : ( + + Run on Google Cloud + + ) ) : ( + Run on Google Cloud + ) : (