Adding about dialog to mobile RHS (#2854)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
95de1468ac
Коммит
2ae993125f
@@ -4,6 +4,7 @@
|
|||||||
import TeamMembersModal from './team_members_modal.jsx';
|
import TeamMembersModal from './team_members_modal.jsx';
|
||||||
import ToggleModalButton from './toggle_modal_button.jsx';
|
import ToggleModalButton from './toggle_modal_button.jsx';
|
||||||
import UserSettingsModal from './user_settings/user_settings_modal.jsx';
|
import UserSettingsModal from './user_settings/user_settings_modal.jsx';
|
||||||
|
import AboutBuildModal from './about_build_modal.jsx';
|
||||||
|
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
@@ -27,15 +28,26 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.onPreferenceChange = this.onPreferenceChange.bind(this);
|
this.onPreferenceChange = this.onPreferenceChange.bind(this);
|
||||||
|
this.handleAboutModal = this.handleAboutModal.bind(this);
|
||||||
|
this.aboutModalDismissed = this.aboutModalDismissed.bind(this);
|
||||||
|
|
||||||
const state = this.getStateFromStores();
|
const state = this.getStateFromStores();
|
||||||
state.showUserSettingsModal = false;
|
state.showUserSettingsModal = false;
|
||||||
|
state.showAboutModal = false;
|
||||||
|
|
||||||
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
|
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
|
||||||
|
|
||||||
this.state = state;
|
this.state = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleAboutModal() {
|
||||||
|
this.setState({showAboutModal: true});
|
||||||
|
}
|
||||||
|
|
||||||
|
aboutModalDismissed() {
|
||||||
|
this.setState({showAboutModal: false});
|
||||||
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
PreferenceStore.addChangeListener(this.onPreferenceChange);
|
PreferenceStore.addChangeListener(this.onPreferenceChange);
|
||||||
}
|
}
|
||||||
@@ -245,12 +257,28 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
<li className='divider'></li>
|
<li className='divider'></li>
|
||||||
{helpLink}
|
{helpLink}
|
||||||
{reportLink}
|
{reportLink}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href='#'
|
||||||
|
onClick={this.handleAboutModal}
|
||||||
|
>
|
||||||
|
<i className='fa fa-info'></i>
|
||||||
|
<FormattedMessage
|
||||||
|
id='navbar_dropdown.about'
|
||||||
|
defaultMessage='About Mattermost'
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<UserSettingsModal
|
<UserSettingsModal
|
||||||
show={this.state.showUserSettingsModal}
|
show={this.state.showUserSettingsModal}
|
||||||
onModalDismissed={() => this.setState({showUserSettingsModal: false})}
|
onModalDismissed={() => this.setState({showUserSettingsModal: false})}
|
||||||
/>
|
/>
|
||||||
|
<AboutBuildModal
|
||||||
|
show={this.state.showAboutModal}
|
||||||
|
onModalDismissed={this.aboutModalDismissed}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user