feat(rn,dynamic-brandind) added background image url to prejoin and lobby
This commit is contained in:
parent
22be96d838
commit
4d8f29d4fe
|
@ -61,11 +61,6 @@ type Props = AbstractProps & {
|
||||||
*/
|
*/
|
||||||
_brandingStyles: Object,
|
_brandingStyles: Object,
|
||||||
|
|
||||||
/**
|
|
||||||
* Branding image background.
|
|
||||||
*/
|
|
||||||
_brandingImageBackgroundUrl: string,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wherther the calendar feature is enabled or not.
|
* Wherther the calendar feature is enabled or not.
|
||||||
*/
|
*/
|
||||||
|
@ -226,7 +221,6 @@ class Conference extends AbstractConference<Props, State> {
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
_brandingImageBackgroundUrl,
|
|
||||||
_brandingStyles,
|
_brandingStyles,
|
||||||
_fullscreenEnabled
|
_fullscreenEnabled
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
@ -237,8 +231,7 @@ class Conference extends AbstractConference<Props, State> {
|
||||||
styles.conference,
|
styles.conference,
|
||||||
_brandingStyles
|
_brandingStyles
|
||||||
] }>
|
] }>
|
||||||
<BrandingImageBackground
|
<BrandingImageBackground />
|
||||||
uri = { _brandingImageBackgroundUrl } />
|
|
||||||
<StatusBar
|
<StatusBar
|
||||||
barStyle = 'light-content'
|
barStyle = 'light-content'
|
||||||
hidden = { _fullscreenEnabled }
|
hidden = { _fullscreenEnabled }
|
||||||
|
@ -520,7 +513,7 @@ class Conference extends AbstractConference<Props, State> {
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
const { isOpen } = state['features/participants-pane'];
|
const { isOpen } = state['features/participants-pane'];
|
||||||
const { aspectRatio, reducedUI } = state['features/base/responsive-ui'];
|
const { aspectRatio, reducedUI } = state['features/base/responsive-ui'];
|
||||||
const { backgroundColor, backgroundImageUrl } = state['features/dynamic-branding'];
|
const { backgroundColor } = state['features/dynamic-branding'];
|
||||||
const participantCount = getParticipantCount(state);
|
const participantCount = getParticipantCount(state);
|
||||||
const brandingStyles = backgroundColor ? {
|
const brandingStyles = backgroundColor ? {
|
||||||
backgroundColor
|
backgroundColor
|
||||||
|
@ -530,7 +523,6 @@ function _mapStateToProps(state) {
|
||||||
...abstractMapStateToProps(state),
|
...abstractMapStateToProps(state),
|
||||||
_aspectRatio: aspectRatio,
|
_aspectRatio: aspectRatio,
|
||||||
_brandingStyles: brandingStyles,
|
_brandingStyles: brandingStyles,
|
||||||
_brandingImageBackgroundUrl: backgroundImageUrl,
|
|
||||||
_calendarEnabled: isCalendarEnabled(state),
|
_calendarEnabled: isCalendarEnabled(state),
|
||||||
_connecting: isConnecting(state),
|
_connecting: isConnecting(state),
|
||||||
_filmstripVisible: isFilmstripVisible(state),
|
_filmstripVisible: isFilmstripVisible(state),
|
||||||
|
|
|
@ -2,6 +2,9 @@ import React from 'react';
|
||||||
import { Image } from 'react-native';
|
import { Image } from 'react-native';
|
||||||
import { SvgUri } from 'react-native-svg';
|
import { SvgUri } from 'react-native-svg';
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
import { connect } from '../../../base/redux';
|
||||||
|
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,6 +24,10 @@ const BrandingImageBackground: React.FC<Props> = ({ uri }:Props) => {
|
||||||
|
|
||||||
let backgroundImage;
|
let backgroundImage;
|
||||||
|
|
||||||
|
if (!uri) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (imageType?.includes('.svg')) {
|
if (imageType?.includes('.svg')) {
|
||||||
backgroundImage
|
backgroundImage
|
||||||
= (
|
= (
|
||||||
|
@ -42,4 +49,20 @@ const BrandingImageBackground: React.FC<Props> = ({ uri }:Props) => {
|
||||||
return backgroundImage;
|
return backgroundImage;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default BrandingImageBackground;
|
/**
|
||||||
|
* Maps (parts of) the Redux state to the associated props for the
|
||||||
|
* {@code DialInLink} component.
|
||||||
|
*
|
||||||
|
* @param {Object} state - The Redux state.
|
||||||
|
* @private
|
||||||
|
* @returns {Props}
|
||||||
|
*/
|
||||||
|
function _mapStateToProps(state: any) {
|
||||||
|
const { backgroundImageUrl } = state['features/dynamic-branding'];
|
||||||
|
|
||||||
|
return {
|
||||||
|
uri: backgroundImageUrl
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default connect(_mapStateToProps)(BrandingImageBackground);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { LoadingIndicator } from '../../../base/react';
|
||||||
import { connect } from '../../../base/redux';
|
import { connect } from '../../../base/redux';
|
||||||
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui';
|
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui';
|
||||||
import BaseTheme from '../../../base/ui/components/BaseTheme';
|
import BaseTheme from '../../../base/ui/components/BaseTheme';
|
||||||
|
import { BrandingImageBackground } from '../../../dynamic-branding';
|
||||||
import { LargeVideo } from '../../../large-video/components';
|
import { LargeVideo } from '../../../large-video/components';
|
||||||
import { navigate }
|
import { navigate }
|
||||||
from '../../../mobile/navigation/components/lobby/LobbyNavigationContainerRef';
|
from '../../../mobile/navigation/components/lobby/LobbyNavigationContainerRef';
|
||||||
|
@ -58,6 +59,7 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
|
||||||
return (
|
return (
|
||||||
<JitsiScreen
|
<JitsiScreen
|
||||||
style = { contentWrapperStyles }>
|
style = { contentWrapperStyles }>
|
||||||
|
<BrandingImageBackground />
|
||||||
<View style = { largeVideoContainerStyles }>
|
<View style = { largeVideoContainerStyles }>
|
||||||
<LargeVideo />
|
<LargeVideo />
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { getLocalParticipant } from '../../base/participants';
|
||||||
import { getFieldValue } from '../../base/react';
|
import { getFieldValue } from '../../base/react';
|
||||||
import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
|
import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui';
|
||||||
import { updateSettings } from '../../base/settings';
|
import { updateSettings } from '../../base/settings';
|
||||||
|
import { BrandingImageBackground } from '../../dynamic-branding';
|
||||||
import { LargeVideo } from '../../large-video/components';
|
import { LargeVideo } from '../../large-video/components';
|
||||||
import HeaderNavigationButton from '../../mobile/navigation/components/HeaderNavigationButton';
|
import HeaderNavigationButton from '../../mobile/navigation/components/HeaderNavigationButton';
|
||||||
import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
|
import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
|
||||||
|
@ -102,6 +103,7 @@ const Prejoin: ({ navigation }: Props) => JSX.Element = ({ navigation }: Props)
|
||||||
<JitsiScreen
|
<JitsiScreen
|
||||||
safeAreaInsets = { [ 'right' ] }
|
safeAreaInsets = { [ 'right' ] }
|
||||||
style = { contentWrapperStyles }>
|
style = { contentWrapperStyles }>
|
||||||
|
<BrandingImageBackground />
|
||||||
<View style = { largeVideoContainerStyles }>
|
<View style = { largeVideoContainerStyles }>
|
||||||
<LargeVideo />
|
<LargeVideo />
|
||||||
</View>
|
</View>
|
||||||
|
|
Loading…
Reference in New Issue