Move DialogContainer to BaseApp to have dialogs on the welcome screen too
This commit is contained in:
parent
17f4b24a3f
commit
126e2d6e14
|
@ -5,6 +5,7 @@ import { Linking } from 'react-native';
|
||||||
|
|
||||||
import '../../analytics';
|
import '../../analytics';
|
||||||
import '../../authentication';
|
import '../../authentication';
|
||||||
|
import { DialogContainer } from '../../base/dialog';
|
||||||
import '../../base/jwt';
|
import '../../base/jwt';
|
||||||
import { Platform } from '../../base/react';
|
import { Platform } from '../../base/react';
|
||||||
import {
|
import {
|
||||||
|
@ -180,6 +181,17 @@ export class App extends AbstractApp {
|
||||||
_onLinkingURL({ url }) {
|
_onLinkingURL({ url }) {
|
||||||
super._openURL(url);
|
super._openURL(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the platform specific dialog container.
|
||||||
|
*
|
||||||
|
* @returns {React$Element}
|
||||||
|
*/
|
||||||
|
_renderDialogContainer() {
|
||||||
|
return (
|
||||||
|
<DialogContainer />
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { DialogContainer } from '../../base/dialog';
|
||||||
import '../../base/responsive-ui';
|
import '../../base/responsive-ui';
|
||||||
import '../../chat';
|
import '../../chat';
|
||||||
import '../../room-lock';
|
import '../../room-lock';
|
||||||
|
@ -39,4 +40,17 @@ export class App extends AbstractApp {
|
||||||
</AtlasKitThemeProvider>
|
</AtlasKitThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the platform specific dialog container.
|
||||||
|
*
|
||||||
|
* @returns {React$Element}
|
||||||
|
*/
|
||||||
|
_renderDialogContainer() {
|
||||||
|
return (
|
||||||
|
<AtlasKitThemeProvider mode = 'dark'>
|
||||||
|
<DialogContainer />
|
||||||
|
</AtlasKitThemeProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ export default class BaseApp extends Component<*, State> {
|
||||||
{ this._createMainElement(component) }
|
{ this._createMainElement(component) }
|
||||||
<SoundCollection />
|
<SoundCollection />
|
||||||
{ this._createExtraElement() }
|
{ this._createExtraElement() }
|
||||||
|
{ this._renderDialogContainer() }
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</Provider>
|
</Provider>
|
||||||
</I18nextProvider>
|
</I18nextProvider>
|
||||||
|
@ -235,4 +236,11 @@ export default class BaseApp extends Component<*, State> {
|
||||||
this.setState({ route }, resolve);
|
this.setState({ route }, resolve);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the platform specific dialog container.
|
||||||
|
*
|
||||||
|
* @returns {React$Element}
|
||||||
|
*/
|
||||||
|
_renderDialogContainer: () => React$Element<*>
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,12 @@ export class DialogContainer extends Component {
|
||||||
/**
|
/**
|
||||||
* The props to pass to the component that will be rendered.
|
* The props to pass to the component that will be rendered.
|
||||||
*/
|
*/
|
||||||
_componentProps: PropTypes.object
|
_componentProps: PropTypes.object,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if the UI is in a compact state where we don't show dialogs.
|
||||||
|
*/
|
||||||
|
_reducedUI: PropTypes.bool
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,10 +37,13 @@ export class DialogContainer extends Component {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { _component: component } = this.props;
|
const {
|
||||||
|
_component: component,
|
||||||
|
_reducedUI: reducedUI
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
component
|
component && !reducedUI
|
||||||
? React.createElement(component, this.props._componentProps)
|
? React.createElement(component, this.props._componentProps)
|
||||||
: null);
|
: null);
|
||||||
}
|
}
|
||||||
|
@ -49,15 +57,18 @@ export class DialogContainer extends Component {
|
||||||
* @private
|
* @private
|
||||||
* @returns {{
|
* @returns {{
|
||||||
* _component: React.Component,
|
* _component: React.Component,
|
||||||
* _componentProps: Object
|
* _componentProps: Object,
|
||||||
|
* _reducedUI: boolean
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
const stateFeaturesBaseDialog = state['features/base/dialog'];
|
const stateFeaturesBaseDialog = state['features/base/dialog'];
|
||||||
|
const { reducedUI } = state['features/base/responsive-ui'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_component: stateFeaturesBaseDialog.component,
|
_component: stateFeaturesBaseDialog.component,
|
||||||
_componentProps: stateFeaturesBaseDialog.componentProps
|
_componentProps: stateFeaturesBaseDialog.componentProps,
|
||||||
|
_reducedUI: reducedUI
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import { connect as reactReduxConnect } from 'react-redux';
|
||||||
|
|
||||||
import { appNavigate } from '../../app';
|
import { appNavigate } from '../../app';
|
||||||
import { connect, disconnect } from '../../base/connection';
|
import { connect, disconnect } from '../../base/connection';
|
||||||
import { DialogContainer } from '../../base/dialog';
|
|
||||||
import { getParticipantCount } from '../../base/participants';
|
import { getParticipantCount } from '../../base/participants';
|
||||||
import { Container, LoadingIndicator, TintedView } from '../../base/react';
|
import { Container, LoadingIndicator, TintedView } from '../../base/react';
|
||||||
import {
|
import {
|
||||||
|
@ -315,11 +314,7 @@ class Conference extends Component<Props> {
|
||||||
this._renderConferenceNotification()
|
this._renderConferenceNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
{/*
|
<NotificationsContainer />
|
||||||
* The dialogs are in the topmost stacking layers.
|
|
||||||
*/
|
|
||||||
this.props._reducedUI || <DialogContainer />
|
|
||||||
}
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import VideoLayout from '../../../../modules/UI/videolayout/VideoLayout';
|
||||||
|
|
||||||
import { obtainConfig } from '../../base/config';
|
import { obtainConfig } from '../../base/config';
|
||||||
import { connect, disconnect } from '../../base/connection';
|
import { connect, disconnect } from '../../base/connection';
|
||||||
import { DialogContainer } from '../../base/dialog';
|
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n';
|
||||||
import { Filmstrip } from '../../filmstrip';
|
import { Filmstrip } from '../../filmstrip';
|
||||||
import { CalleeInfoContainer } from '../../invite';
|
import { CalleeInfoContainer } from '../../invite';
|
||||||
|
@ -226,7 +225,6 @@ class Conference extends Component<Props> {
|
||||||
{ filmstripOnly || <Toolbox /> }
|
{ filmstripOnly || <Toolbox /> }
|
||||||
{ filmstripOnly || <SidePanel /> }
|
{ filmstripOnly || <SidePanel /> }
|
||||||
|
|
||||||
<DialogContainer />
|
|
||||||
<NotificationsContainer />
|
<NotificationsContainer />
|
||||||
|
|
||||||
<CalleeInfoContainer />
|
<CalleeInfoContainer />
|
||||||
|
|
|
@ -7,7 +7,6 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { DialogContainer } from '../../base/dialog';
|
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n';
|
||||||
import { Platform, Watermarks } from '../../base/react';
|
import { Platform, Watermarks } from '../../base/react';
|
||||||
import { CalendarList } from '../../calendar-sync';
|
import { CalendarList } from '../../calendar-sync';
|
||||||
|
@ -168,9 +167,6 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
ref = { this._setAdditionalContentRef } />
|
ref = { this._setAdditionalContentRef } />
|
||||||
: null }
|
: null }
|
||||||
</div>
|
</div>
|
||||||
<AtlasKitThemeProvider mode = 'dark'>
|
|
||||||
<DialogContainer />
|
|
||||||
</AtlasKitThemeProvider>
|
|
||||||
</AtlasKitThemeProvider>
|
</AtlasKitThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue