Explorar o código

Merge branch 'nico/new-onboarding-flow' of https://github.com/porter-dev/porter into nico/new-onboarding-flow

jusrhee %!s(int64=4) %!d(string=hai) anos
pai
achega
d5e38383f3

+ 2 - 2
dashboard/src/components/Breadcrumb.tsx

@@ -36,7 +36,7 @@ const StyledBreadcrumb = styled.div`
 `;
 `;
 
 
 const Crumb = styled.span<{ bold: boolean }>`
 const Crumb = styled.span<{ bold: boolean }>`
-  font-weight: ${props => props.bold ? "600" : "normal"};
-  color: ${props => props.bold ? "#ffffff" : "#aaaabb"};
+  font-weight: ${(props) => (props.bold ? "600" : "normal")};
+  color: ${(props) => (props.bold ? "#ffffff" : "#aaaabb")};
   font-size: 13px;
   font-size: 13px;
 `;
 `;

+ 1 - 0
dashboard/src/main/home/onboarding/steps/ConnectRegistry/ConnectRegistry.tsx

@@ -67,6 +67,7 @@ const ConnectRegistry: React.FC<{
           project={project}
           project={project}
           currentStep={step}
           currentStep={step}
           goBack={goBack}
           goBack={goBack}
+          enable_go_back={enable_go_back}
         />
         />
       ) : (
       ) : (
         <>
         <>

+ 7 - 3
dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/FormFlow.tsx

@@ -65,6 +65,7 @@ type Props = {
   project: { id: number; name: string };
   project: { id: number; name: string };
   currentStep: "credentials" | "settings" | "test_connection";
   currentStep: "credentials" | "settings" | "test_connection";
   goBack: () => void;
   goBack: () => void;
+  enable_go_back: boolean;
 };
 };
 
 
 const FormFlowWrapper: React.FC<Props> = ({
 const FormFlowWrapper: React.FC<Props> = ({
@@ -75,6 +76,7 @@ const FormFlowWrapper: React.FC<Props> = ({
   project,
   project,
   currentStep,
   currentStep,
   goBack,
   goBack,
+  enable_go_back,
 }) => {
 }) => {
   const nextFormStep = (
   const nextFormStep = (
     data?: Partial<Exclude<ConnectedRegistryConfig, SkipRegistryConnection>>
     data?: Partial<Exclude<ConnectedRegistryConfig, SkipRegistryConnection>>
@@ -108,9 +110,11 @@ const FormFlowWrapper: React.FC<Props> = ({
   return (
   return (
     <FormWrapper>
     <FormWrapper>
       <FormHeader>
       <FormHeader>
-        <CloseButton onClick={() => goBack()}>
-          <i className="material-icons">keyboard_backspace</i>
-        </CloseButton>
+        {enable_go_back && (
+          <CloseButton onClick={() => goBack()}>
+            <i className="material-icons">keyboard_backspace</i>
+          </CloseButton>
+        )}
         {FormTitle[provider] && <img src={FormTitle[provider].icon} />}
         {FormTitle[provider] && <img src={FormTitle[provider].icon} />}
         {FormTitle[provider] && FormTitle[provider].label}
         {FormTitle[provider] && FormTitle[provider].label}
       </FormHeader>
       </FormHeader>