Rename style component; Use of status codes instead of flags in conference init

This commit is contained in:
Ilya Daynatovich 2017-02-21 16:24:47 -06:00 committed by Lyubo Marinov
parent 8896b0adf3
commit a8877d82b6
8 changed files with 20 additions and 16 deletions

View File

@ -95,7 +95,7 @@ export function connect() {
// Setting plugin required flag to false because
// it's already been installed.
dispatch(setUnsupportedBrowser({
isPluginRequired: false
name: 'OK'
}));
dispatch(appNavigate(room));
});

View File

@ -10,6 +10,7 @@ import {
declare var APP: Object;
declare var interfaceConfig: Object;
declare var JitsiMeetJS: Object;
/**
* Array of rules defining whether we should intercept component to render
@ -43,17 +44,12 @@ const _RULES = [
}
},
state => {
const {
isOldBrowser,
isPluginRequired
} = state['features/unsupported-browser'];
if (isOldBrowser) {
return UnsupportedDesktopBrowser;
}
if (isPluginRequired) {
switch (state['features/unsupported-browser'].name) {
case 'WEBRTC_NOT_READY':
return PluginRequiredBrowser;
case 'WEBRTC_NOT_SUPPORTED':
return UnsupportedDesktopBrowser;
}
}
];

View File

@ -7,6 +7,7 @@ import { connect, disconnect } from '../../base/connection';
import { Watermarks } from '../../base/react';
import { FeedbackButton } from '../../feedback';
import { OverlayContainer } from '../../overlay';
import { HideNotificationBarStyle } from '../../unsupported-browser';
declare var $: Function;
declare var APP: Object;
@ -174,6 +175,7 @@ class Conference extends Component {
</div>
<OverlayContainer />
<HideNotificationBarStyle />
</div>
);
}

View File

@ -7,7 +7,7 @@ import React, { Component } from 'react';
* @private
* @returns {ReactElement}
*/
export default class UnsupportedMobileBrowserStyle extends Component {
export default class HideNotificationBarStyles extends Component {
/**
* Implements React's {@link Component#render()}.

View File

@ -2,7 +2,7 @@
import React, { Component } from 'react';
import UnsupportedMobileBrowserStyle from './UnsupportedMobileBrowserStyle';
import HideNotificationBarStyle from './HideNotificationBarStyle';
declare var interfaceConfig: Object;
@ -30,7 +30,7 @@ export default class NoMobileApp extends Component {
Please use {interfaceConfig.APP_NAME} on
Desktop to join calls.
</p>
<UnsupportedMobileBrowserStyle />
<HideNotificationBarStyle />
</div>
);
}

View File

@ -5,6 +5,7 @@ import React, { Component } from 'react';
import { Platform } from '../../base/react';
import { CHROME, FIREFOX, IE, SAFARI } from './browserLinks';
import HideNotificationBarStyle from './HideNotificationBarStyle';
/**
* Describes styles namespace for this component.
@ -41,6 +42,8 @@ export default class UnsupportedDesktopBrowser extends Component {
{ this._showSafariLinkIfRequired() }
{ this._showIELinkIfRequired() }.
</p>
<HideNotificationBarStyle />
</div>
);
}

View File

@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { Platform } from '../../base/react';
import UnsupportedMobileBrowserStyle from './UnsupportedMobileBrowserStyle';
import HideNotificationBarStyle from './HideNotificationBarStyle';
/**
* The map of platforms to URLs at which the mobile app for the associated
@ -103,7 +103,8 @@ class UnsupportedMobileBrowser extends Component {
</button>
</a>
</div>
<UnsupportedMobileBrowserStyle />
<HideNotificationBarStyle />
</div>
);
}

View File

@ -1,3 +1,5 @@
export { default as HideNotificationBarStyle }
from './HideNotificationBarStyle';
export { default as NoMobileApp } from './NoMobileApp';
export { default as PluginRequiredBrowser } from './PluginRequiredBrowser';
export { default as UnsupportedDesktopBrowser }