|
|
@@ -523,21 +523,45 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
|
|
|
|
|
|
return (
|
|
|
<StyledLaunchTemplate>
|
|
|
- <ClusterSection>
|
|
|
- {this.props.hideBackButton ? null : (
|
|
|
- <Flex>
|
|
|
- <i className="material-icons" onClick={this.props.hideLaunch}>
|
|
|
- keyboard_backspace
|
|
|
- </i>
|
|
|
- </Flex>
|
|
|
- )}
|
|
|
- <Template>
|
|
|
+ {
|
|
|
+ name !== 'docker' &&
|
|
|
+ <HeaderSection>
|
|
|
+ <i
|
|
|
+ className="material-icons"
|
|
|
+ onClick={this.props.hideLaunch}
|
|
|
+ >
|
|
|
+ keyboard_backspace
|
|
|
+ </i>
|
|
|
{icon
|
|
|
? this.renderIcon(icon)
|
|
|
: this.renderIcon(currentTemplate.icon)}
|
|
|
- {name}
|
|
|
- </Template>
|
|
|
- <i className="material-icons">arrow_right_alt</i>
|
|
|
+ <Title>{name}</Title>
|
|
|
+ </HeaderSection>
|
|
|
+ }
|
|
|
+ <DarkMatter antiHeight="-13px" />
|
|
|
+ <Heading isAtTop={true}>Name</Heading>
|
|
|
+ <Subtitle>
|
|
|
+ Randomly generated if left blank.
|
|
|
+ <Warning
|
|
|
+ highlight={
|
|
|
+ !isAlphanumeric(this.state.templateName) &&
|
|
|
+ this.state.templateName !== ""
|
|
|
+ }
|
|
|
+ >
|
|
|
+ Lowercase letters, numbers, and "-" only.
|
|
|
+ </Warning>
|
|
|
+ </Subtitle>
|
|
|
+ <DarkMatter antiHeight="-29px" />
|
|
|
+ <InputRow
|
|
|
+ type="text"
|
|
|
+ value={this.state.templateName}
|
|
|
+ setValue={(x: string) => this.setState({ templateName: x })}
|
|
|
+ placeholder="ex: doctor-scientist"
|
|
|
+ width="100%"
|
|
|
+ />
|
|
|
+ <Heading>Destination</Heading>
|
|
|
+ <Subtitle>Specify the cluster and namespace you would like to deploy your application to.</Subtitle>
|
|
|
+ <ClusterSection>
|
|
|
<ClusterLabel>
|
|
|
<i className="material-icons">device_hub</i>Cluster
|
|
|
</ClusterLabel>
|
|
|
@@ -569,26 +593,6 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
|
|
|
closeOverlay={true}
|
|
|
/>
|
|
|
</ClusterSection>
|
|
|
- <Subtitle>
|
|
|
- Template name
|
|
|
- <Warning
|
|
|
- highlight={
|
|
|
- !isAlphanumeric(this.state.templateName) &&
|
|
|
- this.state.templateName !== ""
|
|
|
- }
|
|
|
- >
|
|
|
- (lowercase letters, numbers, and "-" only)
|
|
|
- </Warning>
|
|
|
- . (Optional)
|
|
|
- </Subtitle>
|
|
|
- <DarkMatter antiHeight="-27px" />
|
|
|
- <InputRow
|
|
|
- type="text"
|
|
|
- value={this.state.templateName}
|
|
|
- setValue={(x: string) => this.setState({ templateName: x })}
|
|
|
- placeholder="ex: doctor-scientist"
|
|
|
- width="100%"
|
|
|
- />
|
|
|
{this.renderSourceSelector()}
|
|
|
{this.renderSettingsRegion()}
|
|
|
</StyledLaunchTemplate>
|
|
|
@@ -598,6 +602,41 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
|
|
|
|
|
|
LaunchTemplate.contextType = Context;
|
|
|
|
|
|
+const Title = styled.div`
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 600;
|
|
|
+ font-family: "Work Sans", sans-serif;
|
|
|
+ margin-left: 10px;
|
|
|
+ border-radius: 2px;
|
|
|
+ color: #ffffff;
|
|
|
+`;
|
|
|
+
|
|
|
+const HeaderSection = styled.div`
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ > i {
|
|
|
+ cursor: pointer;
|
|
|
+ font-size 24px;
|
|
|
+ color: #969Fbbaa;
|
|
|
+ padding: 3px;
|
|
|
+ border-radius: 100px;
|
|
|
+ :hover {
|
|
|
+ background: #ffffff11;
|
|
|
+ }
|
|
|
+ }
|
|
|
+`;
|
|
|
+
|
|
|
+const Heading = styled.div<{ isAtTop?: boolean }>`
|
|
|
+ color: white;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ margin-top: ${(props) => (props.isAtTop ? "10px" : "30px")};
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+`;
|
|
|
+
|
|
|
const Warning = styled.span<{ highlight: boolean; makeFlush?: boolean }>`
|
|
|
color: ${(props) => (props.highlight ? "#f5cb42" : "")};
|
|
|
margin-left: ${(props) => (props.makeFlush ? "" : "5px")};
|
|
|
@@ -638,7 +677,7 @@ const DarkMatter = styled.div<{ antiHeight?: string }>`
|
|
|
`;
|
|
|
|
|
|
const Subtitle = styled.div`
|
|
|
- padding: 11px 0px 20px;
|
|
|
+ padding: 11px 0px 16px;
|
|
|
font-family: "Work Sans", sans-serif;
|
|
|
font-size: 13px;
|
|
|
color: #aaaabb;
|
|
|
@@ -695,8 +734,9 @@ const ClusterSection = styled.div`
|
|
|
color: #ffffff;
|
|
|
font-family: "Work Sans", sans-serif;
|
|
|
font-size: 14px;
|
|
|
+ margin-top: 2px;
|
|
|
font-weight: 500;
|
|
|
- margin-bottom: 15px;
|
|
|
+ margin-bottom: 22px;
|
|
|
|
|
|
> i {
|
|
|
font-size: 25px;
|