game download menu

This commit is contained in:
SpikeHD
2022-05-24 21:38:49 -07:00
parent 5879207181
commit b4a6c2cb35
7 changed files with 143 additions and 10 deletions

View File

@@ -13,6 +13,8 @@ import MiniDialog from './components/MiniDialog'
import DownloadList from './components/common/DownloadList'
import Downloads from './components/menu/Downloads'
import NewsSection from './components/news/NewsSection'
import Game from './components/menu/Game'
import RightBar from './components/RightBar'
import { getConfigOption, setConfigOption } from '../utils/configuration'
import { invoke } from '@tauri-apps/api'
@@ -27,6 +29,7 @@ interface IState {
optionsOpen: boolean;
miniDownloadsOpen: boolean;
downloadsOpen: boolean;
gameDownloadsOpen: boolean;
bgFile: string;
}
@@ -40,6 +43,7 @@ class App extends React.Component<IProps, IState> {
optionsOpen: false,
miniDownloadsOpen: false,
downloadsOpen: false,
gameDownloadsOpen: false,
bgFile: 'https://webstatic.hoyoverse.com/upload/event/2020/11/04/7fd661b5184e1734f91f628b6f89a31f_7367318474207189623.png',
}
@@ -93,6 +97,7 @@ class App extends React.Component<IProps, IState> {
this.setState({ optionsOpen: !this.state.optionsOpen })
}}
downFunc={() => this.setState({ downloadsOpen: !this.state.downloadsOpen })}
gameFunc={() => this.setState({ gameDownloadsOpen: !this.state.gameDownloadsOpen })}
/>
<RightBar />
@@ -135,6 +140,16 @@ class App extends React.Component<IProps, IState> {
) : null
}
{
// Game downloads menu
this.state.gameDownloadsOpen ? (
<Game
downloadManager={downloadHandler}
closeFn={() => this.setState({ gameDownloadsOpen: false })}
/>
) : null
}
<div className="BottomSection">
<ServerLaunchSection />