summaryrefslogtreecommitdiffstats
path: root/web/react/components/about_build_modal.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-10-08 09:33:56 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2015-10-08 09:33:56 -0400
commit51bf2dc185fd12a70684bfaf5c6b31c100fb102e (patch)
tree6b32111169e12a26e5f19f92017c168333138da4 /web/react/components/about_build_modal.jsx
parent21bf9db56cf41e6f02e9f0e80cec997c94a0c726 (diff)
parente7eca9a9ed990818ef0081078139a967078b8a80 (diff)
downloadchat-51bf2dc185fd12a70684bfaf5c6b31c100fb102e.tar.gz
chat-51bf2dc185fd12a70684bfaf5c6b31c100fb102e.tar.bz2
chat-51bf2dc185fd12a70684bfaf5c6b31c100fb102e.zip
Merge pull request #952 from tomitm/PLT-445
PLT-445 Create About dialog
Diffstat (limited to 'web/react/components/about_build_modal.jsx')
-rw-r--r--web/react/components/about_build_modal.jsx62
1 files changed, 62 insertions, 0 deletions
diff --git a/web/react/components/about_build_modal.jsx b/web/react/components/about_build_modal.jsx
new file mode 100644
index 000000000..d582f6bc8
--- /dev/null
+++ b/web/react/components/about_build_modal.jsx
@@ -0,0 +1,62 @@
+// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+var Modal = ReactBootstrap.Modal;
+
+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.config;
+
+ return (
+ <Modal
+ show={this.props.show}
+ onHide={this.doHide}
+ >
+ <Modal.Header closeButton={true}>
+ <Modal.Title>{`Mattermost ${config.Version}`}</Modal.Title>
+ </Modal.Header>
+ <Modal.Body>
+ <div className='row form-group'>
+ <div className='col-sm-3 info__label'>{'Build Number:'}</div>
+ <div className='col-sm-9'>{config.BuildNumber}</div>
+ </div>
+ <div className='row form-group'>
+ <div className='col-sm-3 info__label'>{'Build Date:'}</div>
+ <div className='col-sm-9'>{config.BuildDate}</div>
+ </div>
+ <div className='row'>
+ <div className='col-sm-3 info__label'>{'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}
+ >
+ {'Close'}
+ </button>
+ </Modal.Footer>
+ </Modal>
+ );
+ }
+}
+
+AboutBuildModal.defaultProps = {
+ show: false
+};
+
+AboutBuildModal.propTypes = {
+ show: React.PropTypes.bool.isRequired,
+ onModalDismissed: React.PropTypes.func.isRequired
+}; \ No newline at end of file