diff options
author | =Corey Hulen <corey@hulen.com> | 2016-03-16 18:13:16 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-03-16 18:13:16 -0700 |
commit | b9d5b4e5dcc1585397f1e1d2e53c5f040ee76220 (patch) | |
tree | 85d2c293aa3456182a754fefe6646162b516eb6c /webapp/components/about_build_modal.jsx | |
parent | e101b2cf7c172d1c4ff20e0df63917b5b8f923ed (diff) | |
parent | cba59d4eb6ef0f65304bc72339c676ebfd653e2b (diff) | |
download | chat-b9d5b4e5dcc1585397f1e1d2e53c5f040ee76220.tar.gz chat-b9d5b4e5dcc1585397f1e1d2e53c5f040ee76220.tar.bz2 chat-b9d5b4e5dcc1585397f1e1d2e53c5f040ee76220.zip |
merging files
Diffstat (limited to 'webapp/components/about_build_modal.jsx')
-rw-r--r-- | webapp/components/about_build_modal.jsx | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/webapp/components/about_build_modal.jsx b/webapp/components/about_build_modal.jsx new file mode 100644 index 000000000..e2fefc44e --- /dev/null +++ b/webapp/components/about_build_modal.jsx @@ -0,0 +1,137 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import {Modal} from 'react-bootstrap'; + +import {FormattedMessage} from 'react-intl'; + +import React from 'react'; + +export default class AboutBuildModal extends React.Component { + constructor(props) { + super(props); + this.doHide = this.doHide.bind(this); + } + + doHide() { + this.props.onModalDismissed(); + } + + render() { + const config = global.window.mm_config; + const license = global.window.mm_license; + + let title = ( + <FormattedMessage + id='about.teamEditiont0' + defaultMessage='Team Edition T0' + /> + ); + + let licensee; + if (config.BuildEnterpriseReady === 'true') { + title = ( + <FormattedMessage + id='about.teamEditiont1' + defaultMessage='Team Edition T1' + /> + ); + if (license.IsLicensed === 'true') { + title = ( + <FormattedMessage + id='about.enterpriseEditione1' + defaultMessage='Enterprise Edition E1' + /> + ); + licensee = ( + <div className='row form-group'> + <div className='col-sm-3 info__label'> + <FormattedMessage + id='about.licensed' + defaultMessage='Licensed by:' + /> + </div> + <div className='col-sm-9'>{license.Company}</div> + </div> + ); + } + } + + return ( + <Modal + show={this.props.show} + onHide={this.doHide} + > + <Modal.Header closeButton={true}> + <Modal.Title> + <FormattedMessage + id='about.title' + defaultMessage='About Mattermost' + /> + </Modal.Title> + </Modal.Header> + <Modal.Body> + <h4>{'Mattermost'} {title}</h4> + {licensee} + <div className='row form-group'> + <div className='col-sm-3 info__label'> + <FormattedMessage + id='about.version' + defaultMessage='Version:' + /> + </div> + <div className='col-sm-9'>{config.Version}</div> + </div> + <div className='row form-group'> + <div className='col-sm-3 info__label'> + <FormattedMessage + id='about.number' + defaultMessage='Build Number:' + /> + </div> + <div className='col-sm-9'>{config.BuildNumber}</div> + </div> + <div className='row form-group'> + <div className='col-sm-3 info__label'> + <FormattedMessage + id='about.date' + defaultMessage='Build Date:' + /> + </div> + <div className='col-sm-9'>{config.BuildDate}</div> + </div> + <div className='row form-group'> + <div className='col-sm-3 info__label'> + <FormattedMessage + id='about.hash' + defaultMessage='Build Hash:' + /> + </div> + <div className='col-sm-9'>{config.BuildHash}</div> + </div> + </Modal.Body> + <Modal.Footer> + <button + type='button' + className='btn btn-default' + onClick={this.doHide} + > + <FormattedMessage + id='about.close' + defaultMessage='Close' + /> + </button> + </Modal.Footer> + </Modal> + ); + } +} + +AboutBuildModal.defaultProps = { + show: false +}; + +AboutBuildModal.propTypes = { + show: React.PropTypes.bool.isRequired, + onModalDismissed: React.PropTypes.func.isRequired +}; |