feat(lobby/prejoin): added room name title (#12054)
* feat(lobby/prejoin): added room name title
This commit is contained in:
parent
372c2cb0f9
commit
6d39d13af7
|
@ -3,6 +3,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Text, View, TextInput } from 'react-native';
|
import { Text, View, TextInput } from 'react-native';
|
||||||
|
|
||||||
|
import { getRoomName } from '../../../base/conference';
|
||||||
import { translate } from '../../../base/i18n';
|
import { translate } from '../../../base/i18n';
|
||||||
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
|
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
|
||||||
import { LoadingIndicator } from '../../../base/react';
|
import { LoadingIndicator } from '../../../base/react';
|
||||||
|
@ -29,7 +30,12 @@ type Props = AbstractProps & {
|
||||||
/**
|
/**
|
||||||
* The current aspect ratio of the screen.
|
* The current aspect ratio of the screen.
|
||||||
*/
|
*/
|
||||||
_aspectRatio: Symbol
|
_aspectRatio: Symbol,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The room name.
|
||||||
|
*/
|
||||||
|
_roomName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,6 +123,14 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
|
||||||
_renderJoining() {
|
_renderJoining() {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
|
<Text style = { styles.lobbyTitle }>
|
||||||
|
{ this.props.t('lobby.joiningTitle') }
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
numberOfLines = { 1 }
|
||||||
|
style = { styles.lobbyRoomName }>
|
||||||
|
{ this.props._roomName }
|
||||||
|
</Text>
|
||||||
<LoadingIndicator
|
<LoadingIndicator
|
||||||
color = { BaseTheme.palette.icon01 }
|
color = { BaseTheme.palette.icon01 }
|
||||||
style = { styles.loadingIndicator } />
|
style = { styles.loadingIndicator } />
|
||||||
|
@ -286,7 +300,8 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
|
||||||
function _mapStateToProps(state: Object, ownProps: Props) {
|
function _mapStateToProps(state: Object, ownProps: Props) {
|
||||||
return {
|
return {
|
||||||
...abstractMapStateToProps(state, ownProps),
|
...abstractMapStateToProps(state, ownProps),
|
||||||
_aspectRatio: state['features/base/responsive-ui'].aspectRatio
|
_aspectRatio: state['features/base/responsive-ui'].aspectRatio,
|
||||||
|
_roomName: getRoomName(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,12 @@ import BaseTheme from '../../../base/ui/components/BaseTheme.native';
|
||||||
|
|
||||||
const SECONDARY_COLOR = BaseTheme.palette.border04;
|
const SECONDARY_COLOR = BaseTheme.palette.border04;
|
||||||
|
|
||||||
|
const lobbyText = {
|
||||||
|
...BaseTheme.typography.heading5,
|
||||||
|
color: BaseTheme.palette.text01,
|
||||||
|
textAlign: 'center'
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
buttonStylesBorderless: {
|
buttonStylesBorderless: {
|
||||||
|
@ -236,5 +242,14 @@ export default {
|
||||||
|
|
||||||
lobbySwitchIcon: {
|
lobbySwitchIcon: {
|
||||||
alignSelf: 'flex-end'
|
alignSelf: 'flex-end'
|
||||||
|
},
|
||||||
|
|
||||||
|
lobbyTitle: {
|
||||||
|
...lobbyText
|
||||||
|
},
|
||||||
|
|
||||||
|
lobbyRoomName: {
|
||||||
|
...lobbyText,
|
||||||
|
marginBottom: BaseTheme.spacing[2]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,11 +3,12 @@ import React, { useCallback, useEffect, useLayoutEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import {
|
import {
|
||||||
BackHandler,
|
BackHandler,
|
||||||
View,
|
|
||||||
TextInput,
|
|
||||||
Platform,
|
Platform,
|
||||||
StyleProp,
|
StyleProp,
|
||||||
|
Text,
|
||||||
|
TextInput,
|
||||||
TextStyle,
|
TextStyle,
|
||||||
|
View,
|
||||||
ViewStyle
|
ViewStyle
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
|
@ -17,6 +18,8 @@ import { appNavigate } from '../../app/actions.native';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { setAudioOnly } from '../../base/audio-only/actions';
|
import { setAudioOnly } from '../../base/audio-only/actions';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
import { getRoomName } from '../../base/conference/functions';
|
||||||
|
// @ts-ignore
|
||||||
import { connect } from '../../base/connection/actions.native';
|
import { connect } from '../../base/connection/actions.native';
|
||||||
import { IconClose } from '../../base/icons/svg/index';
|
import { IconClose } from '../../base/icons/svg/index';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -61,6 +64,7 @@ const Prejoin: React.FC<PrejoinProps> = ({ navigation }: PrejoinProps) => {
|
||||||
);
|
);
|
||||||
const localParticipant = useSelector((state: any) => getLocalParticipant(state));
|
const localParticipant = useSelector((state: any) => getLocalParticipant(state));
|
||||||
const isDisplayNameMandatory = useSelector(state => isDisplayNameRequired(state));
|
const isDisplayNameMandatory = useSelector(state => isDisplayNameRequired(state));
|
||||||
|
const roomName = useSelector(state => getRoomName(state));
|
||||||
const participantName = localParticipant?.name;
|
const participantName = localParticipant?.name;
|
||||||
const [ displayName, setDisplayName ]
|
const [ displayName, setDisplayName ]
|
||||||
= useState(participantName || '');
|
= useState(participantName || '');
|
||||||
|
@ -149,6 +153,14 @@ const Prejoin: React.FC<PrejoinProps> = ({ navigation }: PrejoinProps) => {
|
||||||
</View>
|
</View>
|
||||||
<View style = { contentContainerStyles }>
|
<View style = { contentContainerStyles }>
|
||||||
<View style = { styles.formWrapper as StyleProp<ViewStyle> }>
|
<View style = { styles.formWrapper as StyleProp<ViewStyle> }>
|
||||||
|
<Text style = { styles.preJoinTitle as StyleProp<TextStyle> }>
|
||||||
|
{ t('prejoin.joinMeeting') }
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
numberOfLines = { 1 }
|
||||||
|
style = { styles.preJoinRoomName as StyleProp<TextStyle> }>
|
||||||
|
{ roomName }
|
||||||
|
</Text>
|
||||||
<TextInput
|
<TextInput
|
||||||
onChangeText = { onChangeDisplayName }
|
onChangeText = { onChangeDisplayName }
|
||||||
placeholder = { t('dialog.enterDisplayName') }
|
placeholder = { t('dialog.enterDisplayName') }
|
||||||
|
|
|
@ -2,6 +2,11 @@ import BaseTheme from '../../base/ui/components/BaseTheme.native';
|
||||||
|
|
||||||
const SECONDARY_COLOR = BaseTheme.palette.border04;
|
const SECONDARY_COLOR = BaseTheme.palette.border04;
|
||||||
|
|
||||||
|
const preJoinText = {
|
||||||
|
...BaseTheme.typography.heading5,
|
||||||
|
color: BaseTheme.palette.text01,
|
||||||
|
textAlign: 'center'
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
prejoinButton: {
|
prejoinButton: {
|
||||||
|
@ -67,13 +72,13 @@ export default {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
marginTop: BaseTheme.spacing[4]
|
marginTop: BaseTheme.spacing[3]
|
||||||
},
|
},
|
||||||
|
|
||||||
toolboxContainerWide: {
|
toolboxContainerWide: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
marginTop: BaseTheme.spacing[4]
|
marginTop: BaseTheme.spacing[3]
|
||||||
},
|
},
|
||||||
|
|
||||||
formWrapper: {
|
formWrapper: {
|
||||||
|
@ -91,5 +96,13 @@ export default {
|
||||||
height: BaseTheme.spacing[7],
|
height: BaseTheme.spacing[7],
|
||||||
marginTop: BaseTheme.spacing[3],
|
marginTop: BaseTheme.spacing[3],
|
||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
|
},
|
||||||
|
|
||||||
|
preJoinTitle: {
|
||||||
|
...preJoinText
|
||||||
|
},
|
||||||
|
|
||||||
|
preJoinRoomName: {
|
||||||
|
...preJoinText
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue