diff --git a/web/react/components/about_build_modal.jsx b/web/react/components/about_build_modal.jsx
index 87a58ba970..d582f6bc84 100644
--- a/web/react/components/about_build_modal.jsx
+++ b/web/react/components/about_build_modal.jsx
@@ -1,60 +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 (
-
-
-
-
-
-
- {`Mattermost ${config.Version}`}
-
-
-
-
+
+ {`Mattermost ${config.Version}`}
+
+
+
{'Build Number:'}
{config.BuildNumber}
-
-
+
+
{'Build Date:'}
{config.BuildDate}
-
-
+
+
{'Build Hash:'}
{config.BuildHash}
-
-
-
-
-
-
-
+
+
+
+
+
);
}
}
+
+AboutBuildModal.defaultProps = {
+ show: false
+};
+
+AboutBuildModal.propTypes = {
+ show: React.PropTypes.bool.isRequired,
+ onModalDismissed: React.PropTypes.func.isRequired
+};
\ No newline at end of file
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index 1adb0d8c67..b90ce41707 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -6,6 +6,8 @@ var client = require('../utils/client.jsx');
var UserStore = require('../stores/user_store.jsx');
var TeamStore = require('../stores/team_store.jsx');
+var AboutBuildModal = require('./about_build_modal.jsx');
+
var Constants = require('../utils/constants.jsx');
function getStateFromStores() {
@@ -18,7 +20,9 @@ export default class NavbarDropdown extends React.Component {
this.blockToggle = false;
this.handleLogoutClick = this.handleLogoutClick.bind(this);
+ this.handleAboutModal = this.handleAboutModal.bind(this);
this.onListenerChange = this.onListenerChange.bind(this);
+ this.aboutModalDismissed = this.aboutModalDismissed.bind(this);
this.state = getStateFromStores();
}
@@ -26,6 +30,12 @@ export default class NavbarDropdown extends React.Component {
e.preventDefault();
client.logout();
}
+ handleAboutModal() {
+ this.setState({showAboutModal: true});
+ }
+ aboutModalDismissed() {
+ this.setState({showAboutModal: false});
+ }
componentDidMount() {
UserStore.addTeamsChangeListener(this.onListenerChange);
TeamStore.addChangeListener(this.onListenerChange);
@@ -226,12 +236,15 @@ export default class NavbarDropdown extends React.Component {
{'About Mattermost'}
+
diff --git a/web/react/pages/channel.jsx b/web/react/pages/channel.jsx
index 3eed913663..c333fd57dc 100644
--- a/web/react/pages/channel.jsx
+++ b/web/react/pages/channel.jsx
@@ -30,7 +30,6 @@ var ErrorStore = require('../stores/error_store.jsx');
var ChannelLoader = require('../components/channel_loader.jsx');
var MentionList = require('../components/mention_list.jsx');
var ChannelInfoModal = require('../components/channel_info_modal.jsx');
-var AboutBuildModal = require('../components/about_build_modal.jsx');
var AccessHistoryModal = require('../components/access_history_modal.jsx');
var ActivityLogModal = require('../components/activity_log_modal.jsx');
var RemovedFromChannelModal = require('../components/removed_from_channel_modal.jsx');
@@ -151,11 +150,6 @@ function setupChannelPage(props) {
document.getElementById('channel_info_modal')
);
- React.render(
-
,
- document.getElementById('about_build_modal')
- );
-
React.render(
,
document.getElementById('more_channels_modal')
diff --git a/web/templates/channel.html b/web/templates/channel.html
index 787a1e6a68..2af94e415f 100644
--- a/web/templates/channel.html
+++ b/web/templates/channel.html
@@ -47,7 +47,6 @@
-