mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +00:00
Fix theme warnings
Changelog-entry: Fix theme warnings Change-type: patch
This commit is contained in:
parent
f1be4f50a3
commit
4a6a471345
@ -130,14 +130,12 @@ export class MainPage extends React.Component<
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
private renderMain() {
|
||||||
const shouldDriveStepBeDisabled = !this.state.hasImage;
|
const shouldDriveStepBeDisabled = !this.state.hasImage;
|
||||||
const shouldFlashStepBeDisabled =
|
const shouldFlashStepBeDisabled =
|
||||||
!this.state.hasImage || !this.state.hasDrive;
|
!this.state.hasImage || !this.state.hasDrive;
|
||||||
|
|
||||||
if (this.state.current === 'main') {
|
|
||||||
return (
|
return (
|
||||||
<ThemedProvider style={{ height: '100%', width: '100%' }}>
|
<>
|
||||||
<header
|
<header
|
||||||
id="app-header"
|
id="app-header"
|
||||||
style={{
|
style={{
|
||||||
@ -246,9 +244,7 @@ export class MainPage extends React.Component<
|
|||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
driveTitle={middleEllipsis(this.state.driveTitle, 16)}
|
driveTitle={middleEllipsis(this.state.driveTitle, 16)}
|
||||||
shouldShow={
|
shouldShow={this.state.isFlashing && this.state.isWebviewShowing}
|
||||||
this.state.isFlashing && this.state.isWebviewShowing
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -260,9 +256,11 @@ export class MainPage extends React.Component<
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Flex>
|
</Flex>
|
||||||
</ThemedProvider>
|
</>
|
||||||
);
|
);
|
||||||
} else if (this.state.current === 'success') {
|
}
|
||||||
|
|
||||||
|
private renderSuccess() {
|
||||||
return (
|
return (
|
||||||
<div className="section-loader isFinish">
|
<div className="section-loader isFinish">
|
||||||
<FinishPage goToMain={() => this.setState({ current: 'main' })} />
|
<FinishPage goToMain={() => this.setState({ current: 'main' })} />
|
||||||
@ -270,6 +268,15 @@ export class MainPage extends React.Component<
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public render() {
|
||||||
|
return (
|
||||||
|
<ThemedProvider style={{ height: '100%', width: '100%' }}>
|
||||||
|
{this.state.current === 'main'
|
||||||
|
? this.renderMain()
|
||||||
|
: this.renderSuccess()}
|
||||||
|
</ThemedProvider>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user