Files
jitsi-meet/react/features/overlay/components/native/LoadConfigOverlay.js
Saúl Ibarra Corretgé d7b581e338 feat)rn,sdk) introduce a "ready to close" event
This event is the event host applications need to listen to for knowing when to
dispose the SDK from now on.

Since the introduction of breakout rooms it's possible that we navigate from one
meeting to another, so there will be several conference join / terminations.

In addition, local track destruction is now moved to SET_ROOM when there is no
room, aka, we are going back to the welcome page or to the black page.
2021-11-24 09:58:48 +01:00

70 lines
2.0 KiB
JavaScript

// @flow
import React, { PureComponent } from 'react';
import { SafeAreaView, Text, View } from 'react-native';
import { translate } from '../../../base/i18n';
import { LoadingIndicator } from '../../../base/react';
import { StyleType } from '../../../base/styles';
import OverlayFrame from './OverlayFrame';
import styles, { TEXT_COLOR } from './styles';
type Props = {
/**
* The color schemed style of the component.
*/
_styles: StyleType,
/**
* The Function to be invoked to translate i18n keys.
*/
t: Function
};
/**
* Implements an overlay to tell the user that there is an operation in progress in the background during connect
* so then the app doesn't seem hung.
*/
class LoadConfigOverlay extends PureComponent<Props> {
/**
* Determines whether this overlay needs to be rendered (according to a
* specific redux state). Called by {@link OverlayContainer}.
*
* @param {Object} state - The redux state.
* @returns {boolean} - If this overlay needs to be rendered, {@code true};
* {@code false}, otherwise.
*/
static needsRender(state: Object) {
return Boolean(state['features/overlay'].loadConfigOverlayVisible);
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
return (
<OverlayFrame>
<View style = { styles.loadingOverlayWrapper }>
<SafeAreaView>
<LoadingIndicator
color = { TEXT_COLOR }
size = 'large'
style = { styles.connectIndicator } />
<Text style = { styles.loadingOverlayText }>
{ this.props.t('connectingOverlay.joiningRoom') }
</Text>
</SafeAreaView>
</View>
</OverlayFrame>
);
}
}
export default translate(LoadConfigOverlay);