Commit c8d65f7c authored by 2breakegg's avatar 2breakegg

loading

parent be68fa8d
...@@ -129,6 +129,12 @@ ...@@ -129,6 +129,12 @@
margin-top: 20px; margin-top: 20px;
} }
.loading
{
margin-top: 20px;
font-size:20px;
color:white;
}
#Card4Button #Card4Button
{ {
......
...@@ -87,8 +87,8 @@ export default class App extends Component { ...@@ -87,8 +87,8 @@ export default class App extends Component {
return data return data
} }
changeLanguage(language){ changeLanguage(language) {
localStorage.setItem('language',language); localStorage.setItem('language', language);
history.go(0); history.go(0);
} }
...@@ -102,15 +102,15 @@ export default class App extends Component { ...@@ -102,15 +102,15 @@ export default class App extends Component {
const realData = i18Data[language] ? i18Data[language] : i18Data[this.props.language] ? i18Data[this.props.language] : i18Data['zh-CN'] const realData = i18Data[language] ? i18Data[language] : i18Data[this.props.language] ? i18Data[this.props.language] : i18Data['zh-CN']
const menu = ( const menu = (
<Menu style={{transform: 'translateX(-16px)'}}> <Menu style={{ transform: 'translateX(-16px)' }}>
<Menu.Item key="0"> <Menu.Item key="0">
<a onClick={() => this.changeLanguage('en-US')} className='changelanguage'> <a onClick={() => this.changeLanguage('en-US')} className='changelanguage'>
<img alt="img" src={require('../public/flag-us.png')}/> <img alt="img" src={require('../public/flag-us.png')} />
&nbsp;English</a> &nbsp;English</a>
</Menu.Item> </Menu.Item>
<Menu.Item key="1"> <Menu.Item key="1">
<a onClick={() => this.changeLanguage('zh-CN')} className='changelanguage'> <a onClick={() => this.changeLanguage('zh-CN')} className='changelanguage'>
<img alt="img" src={require('../public/flag-cn.png')}/> <img alt="img" src={require('../public/flag-cn.png')} />
&nbsp;中文</a> &nbsp;中文</a>
</Menu.Item> </Menu.Item>
</Menu> </Menu>
...@@ -140,6 +140,8 @@ export default class App extends Component { ...@@ -140,6 +140,8 @@ export default class App extends Component {
Beta Beta
</span> </span>
</div> </div>
{latest[this.state.platform].url ? (
<div style={{ textAlign: 'center' }}>
<div className="font-C-Gray"> <div className="font-C-Gray">
<FormattedMessage id="SupportBoth" /> <FormattedMessage id="SupportBoth" />
<DownLoadLink text='Windows' data={latest.win32} /> <DownLoadLink text='Windows' data={latest.win32} />
...@@ -147,13 +149,16 @@ export default class App extends Component { ...@@ -147,13 +149,16 @@ export default class App extends Component {
<DownLoadLink text='Mac' data={latest.drawin} /> <DownLoadLink text='Mac' data={latest.drawin} />
<FormattedMessage id="OperationSystem" /> <FormattedMessage id="OperationSystem" />
</div> </div>
<a href={latest[this.state.platform].url}> <a href={latest[this.state.platform].url}>
<Button type="primary" icon="download" size='large'> <Button type="primary" icon="download" size='large'>
<FormattedMessage id={"Download"} /> <FormattedMessage id={"Download"} />
</Button> </Button>
</a> </a>
</div> </div>
) : (
<div className="loading">Loading...</div>
)}
</div>
</Col> </Col>
</Row> </Row>
</Content> </Content>
...@@ -280,7 +285,7 @@ export default class App extends Component { ...@@ -280,7 +285,7 @@ export default class App extends Component {
(<div> (<div>
<Content className="App-Content2"> <Content className="App-Content2">
<Col span="14"> <Col span="14">
<p id="Welcome"><FormattedMessage id={"Welcome"}/></p> <p id="Welcome"><FormattedMessage id={"Welcome"} /></p>
<a href={latest[this.state.platform].url}> <a href={latest[this.state.platform].url}>
<Button id="downloadbot" type="primary" icon="download" size='large'> <Button id="downloadbot" type="primary" icon="download" size='large'>
<FormattedMessage id={"Download"} /> <FormattedMessage id={"Download"} />
...@@ -311,13 +316,13 @@ export default class App extends Component { ...@@ -311,13 +316,13 @@ export default class App extends Component {
<Footer> <Footer>
<div> <div>
<Dropdown overlay={menu} trigger={['click']}> <Dropdown overlay={menu} trigger={['click']}>
{language==='en-US'? {language === 'en-US' ?
(<a className="ant-dropdown-link changelanguage" href="#"> (<a className="ant-dropdown-link changelanguage" href="#">
<img alt="img" src={require('../public/flag-us.png')}/> <img alt="img" src={require('../public/flag-us.png')} />
&nbsp;English <Icon type="down" className="flag"/> &nbsp;English <Icon type="down" className="flag" />
</a>):(<a className="ant-dropdown-link changelanguage" href="#"> </a>) : (<a className="ant-dropdown-link changelanguage" href="#">
<img alt="img" src={require('../public/flag-cn.png')}/> <img alt="img" src={require('../public/flag-cn.png')} />
&nbsp;中文 <Icon type="down" className="flag"/> &nbsp;中文 <Icon type="down" className="flag" />
</a>)} </a>)}
</Dropdown> </Dropdown>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment