mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 19:26:33 +00:00
Remove useless StepSelection component
Change-type: patch
This commit is contained in:
parent
95ff5c98a8
commit
6db0172a50
@ -36,7 +36,6 @@ import { scanner as driveScanner } from '../../modules/drive-scanner';
|
|||||||
import * as imageWriter from '../../modules/image-writer';
|
import * as imageWriter from '../../modules/image-writer';
|
||||||
import * as progressStatus from '../../modules/progress-status';
|
import * as progressStatus from '../../modules/progress-status';
|
||||||
import * as notification from '../../os/notification';
|
import * as notification from '../../os/notification';
|
||||||
import { StepSelection } from '../../styled-components';
|
|
||||||
|
|
||||||
const COMPLETED_PERCENTAGE = 100;
|
const COMPLETED_PERCENTAGE = 100;
|
||||||
const SPEED_PRECISION = 2;
|
const SPEED_PRECISION = 2;
|
||||||
@ -261,33 +260,31 @@ export class FlashStep extends React.PureComponent<
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-vertical-large">
|
<div className="space-vertical-large" style={{ display: 'flex' }}>
|
||||||
<StepSelection>
|
<ProgressButton
|
||||||
<ProgressButton
|
type={this.props.step}
|
||||||
type={this.props.step}
|
active={this.props.isFlashing}
|
||||||
active={this.props.isFlashing}
|
percentage={this.props.percentage}
|
||||||
percentage={this.props.percentage}
|
label={getProgressButtonLabel(
|
||||||
label={getProgressButtonLabel(
|
this.props.isFlashing,
|
||||||
this.props.isFlashing,
|
this.props.step,
|
||||||
this.props.step,
|
this.props.position,
|
||||||
this.props.position,
|
this.props.percentage,
|
||||||
this.props.percentage,
|
|
||||||
)}
|
|
||||||
disabled={this.props.shouldFlashStepBeDisabled}
|
|
||||||
callback={() => {
|
|
||||||
this.tryFlash();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{this.props.isFlashing && (
|
|
||||||
<IconButton
|
|
||||||
icon={<FontAwesomeIcon icon={faTimes} />}
|
|
||||||
plain
|
|
||||||
onClick={imageWriter.cancel}
|
|
||||||
color="#fff"
|
|
||||||
hoverIndicator={{ dark: true }}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</StepSelection>
|
disabled={this.props.shouldFlashStepBeDisabled}
|
||||||
|
callback={() => {
|
||||||
|
this.tryFlash();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{this.props.isFlashing && (
|
||||||
|
<IconButton
|
||||||
|
icon={<FontAwesomeIcon icon={faTimes} />}
|
||||||
|
plain
|
||||||
|
onClick={imageWriter.cancel}
|
||||||
|
color="#fff"
|
||||||
|
hoverIndicator={{ dark: true }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{!_.isNil(this.props.speed) &&
|
{!_.isNil(this.props.speed) &&
|
||||||
this.props.percentage !== COMPLETED_PERCENTAGE && (
|
this.props.percentage !== COMPLETED_PERCENTAGE && (
|
||||||
|
@ -123,10 +123,6 @@ export const StepNameButton = styled(Button)`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const StepSelection = styled(Flex)`
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
`;
|
|
||||||
export const Footer = styled(Txt)`
|
export const Footer = styled(Txt)`
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
color: ${colors.dark.disabled.foreground};
|
color: ${colors.dark.disabled.foreground};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user