mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-20 09:46:31 +00:00
Simplify MainPage
Change-type: patch
This commit is contained in:
parent
c9bfd350ed
commit
2c07538f8f
@ -242,36 +242,28 @@ export class MainPage extends React.Component<
|
|||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
>
|
>
|
||||||
{notFlashingOrSplitView && (
|
{notFlashingOrSplitView && (
|
||||||
|
<>
|
||||||
<SourceSelector
|
<SourceSelector
|
||||||
flashing={this.state.isFlashing}
|
flashing={this.state.isFlashing}
|
||||||
afterSelected={(source: SourceOptions) =>
|
afterSelected={(source: SourceOptions) =>
|
||||||
this.setState({ source })
|
this.setState({ source })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
|
|
||||||
{notFlashingOrSplitView && (
|
|
||||||
<Flex>
|
<Flex>
|
||||||
<StepBorder disabled={shouldDriveStepBeDisabled} left />
|
<StepBorder disabled={shouldDriveStepBeDisabled} left />
|
||||||
</Flex>
|
</Flex>
|
||||||
)}
|
|
||||||
|
|
||||||
{notFlashingOrSplitView && (
|
|
||||||
<DriveSelector
|
<DriveSelector
|
||||||
disabled={shouldDriveStepBeDisabled}
|
disabled={shouldDriveStepBeDisabled}
|
||||||
hasDrive={this.state.hasDrive}
|
hasDrive={this.state.hasDrive}
|
||||||
flashing={this.state.isFlashing}
|
flashing={this.state.isFlashing}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
|
|
||||||
{notFlashingOrSplitView && (
|
|
||||||
<Flex>
|
<Flex>
|
||||||
<StepBorder disabled={shouldFlashStepBeDisabled} right />
|
<StepBorder disabled={shouldFlashStepBeDisabled} right />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{this.state.isFlashing && (
|
{this.state.isFlashing && this.state.isWebviewShowing && (
|
||||||
<>
|
|
||||||
<Flex
|
<Flex
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
@ -281,7 +273,6 @@ export class MainPage extends React.Component<
|
|||||||
height: '100vh',
|
height: '100vh',
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
boxShadow: '0 2px 15px 0 rgba(0, 0, 0, 0.2)',
|
boxShadow: '0 2px 15px 0 rgba(0, 0, 0, 0.2)',
|
||||||
display: this.state.isWebviewShowing ? 'block' : 'none',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ReducedFlashingInfos
|
<ReducedFlashingInfos
|
||||||
@ -302,7 +293,8 @@ export class MainPage extends React.Component<
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
{this.state.featuredProjectURL && (
|
)}
|
||||||
|
{this.state.isFlashing && this.state.featuredProjectURL && (
|
||||||
<SafeWebview
|
<SafeWebview
|
||||||
src={this.state.featuredProjectURL}
|
src={this.state.featuredProjectURL}
|
||||||
onWebviewShow={(isWebviewShowing: boolean) => {
|
onWebviewShow={(isWebviewShowing: boolean) => {
|
||||||
@ -317,8 +309,6 @@ export class MainPage extends React.Component<
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<FlashStep
|
<FlashStep
|
||||||
goToSuccess={() => this.setState({ current: 'success' })}
|
goToSuccess={() => this.setState({ current: 'success' })}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user