mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2026-02-06 02:06:29 +01:00
do not show prog bar when not downloading
This commit is contained in:
@@ -83,6 +83,15 @@ class App extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
await setConfigOption('cert_generated', true)
|
await setConfigOption('cert_generated', true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Period check to only show progress bar when downloading files
|
||||||
|
setInterval(() => {
|
||||||
|
this.setState({
|
||||||
|
isDownloading: downloadHandler.getDownloads().filter(d => d.status !== 'finished')?.length > 0
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(downloadHandler.getDownloads())
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -156,7 +165,9 @@ class App extends React.Component<IProps, IState> {
|
|||||||
<div id="DownloadProgress"
|
<div id="DownloadProgress"
|
||||||
onClick={() => this.setState({ miniDownloadsOpen: !this.state.miniDownloadsOpen })}
|
onClick={() => this.setState({ miniDownloadsOpen: !this.state.miniDownloadsOpen })}
|
||||||
>
|
>
|
||||||
<MainProgressBar downloadManager={downloadHandler} />
|
{ this.state.isDownloading ?
|
||||||
|
<MainProgressBar downloadManager={downloadHandler} />
|
||||||
|
: null }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user