|
|
@@ -109,68 +109,63 @@ export const NewProjectFC = () => {
|
|
|
};
|
|
|
|
|
|
const renderContents = () => {
|
|
|
- let version = capabilities?.version;
|
|
|
- if (version !== "production" || user.email === "support@porter.run") {
|
|
|
- return (
|
|
|
- <>
|
|
|
- <FadeWrapper>
|
|
|
- {!isFirstProject && (
|
|
|
- <BackButton
|
|
|
- onClick={() => {
|
|
|
- pushFiltered("/dashboard", []);
|
|
|
- }}
|
|
|
- >
|
|
|
- <BackButtonImg src={backArrow} />
|
|
|
- </BackButton>
|
|
|
- )}
|
|
|
- <TitleSection>New project</TitleSection>
|
|
|
- </FadeWrapper>
|
|
|
- <FadeWrapper delay="0.7s">
|
|
|
- <Helper>
|
|
|
- Project name
|
|
|
- <Warning highlight={validateProjectName().hasError}>
|
|
|
- (lowercase letters, numbers, and "-" only)
|
|
|
- </Warning>
|
|
|
- <Required>*</Required>
|
|
|
- </Helper>
|
|
|
- </FadeWrapper>
|
|
|
- <SlideWrapper delay="1.2s">
|
|
|
- <InputWrapper>
|
|
|
- <ProjectIcon>
|
|
|
- <ProjectImage src={gradient} />
|
|
|
- <Letter>
|
|
|
- {name ? name.toUpperCase().substring(0, 1) : "-"}
|
|
|
- </Letter>
|
|
|
- </ProjectIcon>
|
|
|
- <InputRow
|
|
|
- type="string"
|
|
|
- value={name}
|
|
|
- setValue={(x: string) => {
|
|
|
- setButtonStatus("");
|
|
|
- setName(x);
|
|
|
- }}
|
|
|
- placeholder="ex: perspective-vortex"
|
|
|
- width="470px"
|
|
|
- disabled={buttonStatus === "loading"}
|
|
|
- />
|
|
|
- </InputWrapper>
|
|
|
- <NewProjectSaveButton
|
|
|
- text="Create project"
|
|
|
- disabled={false}
|
|
|
- onClick={createProject}
|
|
|
- status={buttonStatus}
|
|
|
- makeFlush={true}
|
|
|
- clearPosition={true}
|
|
|
- statusPosition="right"
|
|
|
- saveText="Creating project..."
|
|
|
- successText="Project created successfully!"
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ <FadeWrapper>
|
|
|
+ {!isFirstProject && (
|
|
|
+ <BackButton
|
|
|
+ onClick={() => {
|
|
|
+ pushFiltered("/dashboard", []);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <BackButtonImg src={backArrow} />
|
|
|
+ </BackButton>
|
|
|
+ )}
|
|
|
+ <TitleSection>New project</TitleSection>
|
|
|
+ </FadeWrapper>
|
|
|
+ <FadeWrapper delay="0.7s">
|
|
|
+ <Helper>
|
|
|
+ Project name
|
|
|
+ <Warning highlight={validateProjectName().hasError}>
|
|
|
+ (lowercase letters, numbers, and "-" only)
|
|
|
+ </Warning>
|
|
|
+ <Required>*</Required>
|
|
|
+ </Helper>
|
|
|
+ </FadeWrapper>
|
|
|
+ <SlideWrapper delay="1.2s">
|
|
|
+ <InputWrapper>
|
|
|
+ <ProjectIcon>
|
|
|
+ <ProjectImage src={gradient} />
|
|
|
+ <Letter>
|
|
|
+ {name ? name.toUpperCase().substring(0, 1) : "-"}
|
|
|
+ </Letter>
|
|
|
+ </ProjectIcon>
|
|
|
+ <InputRow
|
|
|
+ type="string"
|
|
|
+ value={name}
|
|
|
+ setValue={(x: string) => {
|
|
|
+ setButtonStatus("");
|
|
|
+ setName(x);
|
|
|
+ }}
|
|
|
+ placeholder="ex: perspective-vortex"
|
|
|
+ width="470px"
|
|
|
+ disabled={buttonStatus === "loading"}
|
|
|
/>
|
|
|
- </SlideWrapper>
|
|
|
- </>
|
|
|
- );
|
|
|
- } else {
|
|
|
- return <WelcomeForm />;
|
|
|
- }
|
|
|
+ </InputWrapper>
|
|
|
+ <NewProjectSaveButton
|
|
|
+ text="Create project"
|
|
|
+ disabled={false}
|
|
|
+ onClick={createProject}
|
|
|
+ status={buttonStatus}
|
|
|
+ makeFlush={true}
|
|
|
+ clearPosition={true}
|
|
|
+ statusPosition="right"
|
|
|
+ saveText="Creating project..."
|
|
|
+ successText="Project created successfully!"
|
|
|
+ />
|
|
|
+ </SlideWrapper>
|
|
|
+ </>
|
|
|
+ );
|
|
|
};
|
|
|
|
|
|
return (
|