summaryrefslogtreecommitdiffstats
path: root/webapp/components/navbar_dropdown.jsx
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-09-16 15:35:13 -0300
committerGitHub <noreply@github.com>2016-09-16 15:35:13 -0300
commit781ff323db4c70e4ca476f9ef13a04e5aa063585 (patch)
treea9dae870d4e750ad87ee0624d8ea859995b0dbf7 /webapp/components/navbar_dropdown.jsx
parentdf2d61d94175369bff5a16242f35cb6d7b62d7fb (diff)
downloadchat-781ff323db4c70e4ca476f9ef13a04e5aa063585.tar.gz
chat-781ff323db4c70e4ca476f9ef13a04e5aa063585.tar.bz2
chat-781ff323db4c70e4ca476f9ef13a04e5aa063585.zip
Webrtc client side (#4026)
* WebRTC Server side * WebRTC client side * Bug fixes and improvements * Pushing UI improvements for webrtc (#3728) * Pushing UI improvements for webrtc * Updating webrtc css * PLT-3943 WebRTC P1: bug fixes and improvements * Video resolution set to std, reduce volume of ringtone and flip video horizontally * Fix calling a user B while WebRTC RHS is still opened * Leave RHS opened when call ends, Fix isBusy on popover and channel_header * Fix pre-release feature, RHS & System Console * PLT-3945 - Updating UI for webrtc (#3908) * PLT-3943 Webrtc p1 * Add ongoing call indicator when RHS is opened * UI updates to to webrtc notifcation (#3959)
Diffstat (limited to 'webapp/components/navbar_dropdown.jsx')
-rw-r--r--webapp/components/navbar_dropdown.jsx24
1 files changed, 21 insertions, 3 deletions
diff --git a/webapp/components/navbar_dropdown.jsx b/webapp/components/navbar_dropdown.jsx
index 413942865..c29bf61c3 100644
--- a/webapp/components/navbar_dropdown.jsx
+++ b/webapp/components/navbar_dropdown.jsx
@@ -6,12 +6,13 @@ import * as GlobalActions from 'actions/global_actions.jsx';
import TeamStore from 'stores/team_store.jsx';
import UserStore from 'stores/user_store.jsx';
+import WebrtcStore from 'stores/webrtc_store.jsx';
import AboutBuildModal from './about_build_modal.jsx';
import TeamMembersModal from './team_members_modal.jsx';
import ToggleModalButton from './toggle_modal_button.jsx';
import UserSettingsModal from './user_settings/user_settings_modal.jsx';
-import Constants from 'utils/constants.jsx';
+import {Constants, WebrtcActionTypes} from 'utils/constants.jsx';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router/es6';
@@ -30,6 +31,8 @@ export default class NavbarDropdown extends React.Component {
this.renderCustomEmojiLink = this.renderCustomEmojiLink.bind(this);
+ this.handleClick = this.handleClick.bind(this);
+
this.state = {
showUserSettingsModal: false,
showAboutModal: false,
@@ -38,6 +41,13 @@ export default class NavbarDropdown extends React.Component {
};
}
+ handleClick(e) {
+ if (WebrtcStore.isBusy()) {
+ WebrtcStore.emitChanged({action: WebrtcActionTypes.IN_PROGRESS});
+ e.preventDefault();
+ }
+ }
+
handleAboutModal() {
this.setState({showAboutModal: true});
}
@@ -77,7 +87,10 @@ export default class NavbarDropdown extends React.Component {
return (
<li>
- <Link to={'/' + this.props.teamName + '/emoji'}>
+ <Link
+ onClick={this.handleClick}
+ to={'/' + this.props.teamName + '/emoji'}
+ >
<FormattedMessage
id='navbar_dropdown.emoji'
defaultMessage='Custom Emoji'
@@ -198,7 +211,10 @@ export default class NavbarDropdown extends React.Component {
if (integrationsEnabled && (isAdmin || config.EnableOnlyAdminIntegrations !== 'true')) {
integrationsLink = (
<li>
- <Link to={'/' + this.props.teamName + '/integrations'}>
+ <Link
+ to={'/' + this.props.teamName + '/integrations'}
+ onClick={this.handleClick}
+ >
<FormattedMessage
id='navbar_dropdown.integrations'
defaultMessage='Integrations'
@@ -213,6 +229,7 @@ export default class NavbarDropdown extends React.Component {
<li>
<Link
to={'/admin_console'}
+ onClick={this.handleClick}
>
<FormattedMessage
id='navbar_dropdown.console'
@@ -231,6 +248,7 @@ export default class NavbarDropdown extends React.Component {
<Link
key='newTeam_a'
to='/create_team'
+ onClick={this.handleClick}
>
<FormattedMessage
id='navbar_dropdown.create'