mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
game download menu
This commit is contained in:
@@ -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 />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user