This commit is contained in:
Jay
2017-03-31 15:35:30 +08:00
parent f8f3cbe0d8
commit b419194b6b
5 changed files with 794 additions and 648 deletions
@@ -4,6 +4,7 @@ import Datetime from 'react-datetime';
import {Container, Segment, Form, Header, Menu, Grid, Table, Input} from 'semantic-ui-react';
import NetForm from './NetForm';
import TimeForm from './TimeForm';
import TimezoneForm from './TimezoneForm';
import {convertTime,padding} from '../../../tools';
class SysInfo extends React.Component {
@@ -37,6 +38,11 @@ class SysInfo extends React.Component {
dispatch(set_system_time(dstr));
}
showDialog = (msg) => {
let {dispatch} = this.props;
dispatch(add_dialog_msg(msg));
}
render() {
let {i18n, network, time} = this.props;
return (
@@ -45,6 +51,10 @@ class SysInfo extends React.Component {
<Header as="h2" content={i18n && 't' in i18n ? i18n.t('page.system_info.title.sysinfo') : ''} />
<NetForm i18n={i18n} network={network} onSubmit={this.netSubmit}/>
</Segment>
<Segment>
<Header as="h2" content="Time Zone" />
<TimezoneForm i18n={i18n} showDialog={this.showDialog} />
</Segment>
<Segment style={{marginBottom: '100px'}}>
<Header as="h2" content={i18n && 't' in i18n ? i18n.t('page.system_info.title.timeinfo') : ''} />
<TimeForm i18n={i18n} time={time} onSubmit={this.timeSubmit}/>