Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(rn,conference) new UI for conference name duration
Saúl Ibarra Corretgé78d4af6bf29a
diff --git a/react/features/conference/components/ConferenceTimer.js b/react/features/conference/components/ConferenceTimer.jsindex c53ac9916b..80b8f99df1 100644--- a/react/features/conference/components/ConferenceTimer.js+++ b/react/features/conference/components/ConferenceTimer.js@@ -17,6 +17,11 @@ type Props = {*/_startTimestamp: ?number,+ /**+ * Style to be applied to the rendered text.+ */+ textStyle: ?Object,+/*** The redux {@code dispatch} function.*/@@ -89,13 +94,13 @@ class ConferenceTimer extends Component<Props, State> {*/render() {const { timerValue } = this.state;- const { _startTimestamp } = this.props;+ const { _startTimestamp, textStyle } = this.props;if (!_startTimestamp) {return null;}- return renderConferenceTimer(timerValue);+ return renderConferenceTimer(timerValue, textStyle);}/**@@ -107,7 +112,6 @@ class ConferenceTimer extends Component<Props, State> {* @returns {void}*/_setStateFromUTC(refValueUTC, currentValueUTC) {-if (!refValueUTC || !currentValueUTC) {return;}diff --git a/react/features/conference/components/native/ConferenceTimerDisplay.js b/react/features/conference/components/native/ConferenceTimerDisplay.jsindex 302e898447..17f1cdb953 100644--- a/react/features/conference/components/native/ConferenceTimerDisplay.js+++ b/react/features/conference/components/native/ConferenceTimerDisplay.js@@ -3,20 +3,19 @@import React from 'react';import { Text } from 'react-native';-import styles from './styles';-/*** Returns native element to be rendered.** @param {string} timerValue - String to display as time.+ * @param {Object} textStyle - Style to be applied to the text.** @returns {ReactElement}*/-export default function renderConferenceTimer(timerValue: string) {+export default function renderConferenceTimer(timerValue: string, textStyle: Object) {return (<Text- numberOfLines = { 4 }- style = { styles.roomTimer }>+ numberOfLines = { 1 }+ style = { textStyle }>{ timerValue }</Text>);diff --git a/react/features/conference/components/native/NavigationBar.js b/react/features/conference/components/native/NavigationBar.jsindex f5c24c7aed..0ac5d5886c 100644--- a/react/features/conference/components/native/NavigationBar.js+++ b/react/features/conference/components/native/NavigationBar.js@@ -57,18 +57,27 @@ const NavigationBar = (props: Props) => {styles = { styles.navBarButton } /><ViewpointerEvents = 'box-none'- style = { styles.roomNameWrapper }>- {- props._meetingNameEnabled- && <Text- numberOfLines = { 1 }- style = { styles.roomName }>- { props._meetingName }- </Text>- }- {- props._conferenceTimerEnabled && <ConferenceTimer />- }+ style = { styles.roomNameContainer }>+ <View+ pointerEvents = 'box-none'+ style = { styles.roomNameWrapper }>+ {+ props._meetingNameEnabled+ && <View style = { styles.roomNameView }>+ <Text+ numberOfLines = { 1 }+ style = { styles.roomName }>+ { props._meetingName }+ </Text>+ </View>+ }+ {+ props._conferenceTimerEnabled+ && <View style = { styles.roomTimerView }>+ <ConferenceTimer textStyle = { styles.roomTimer } />+ </View>+ }+ </View><Labels /></View></View>diff --git a/react/features/conference/components/native/styles.js b/react/features/conference/components/native/styles.jsindex 4a40b5a41e..03e17d0530 100644--- a/react/features/conference/components/native/styles.js+++ b/react/features/conference/components/native/styles.js@@ -103,18 +103,35 @@ export default {roomTimer: {color: ColorPalette.white,- fontSize: 15,- opacity: 0.6+ fontSize: 12,+ fontWeight: '400'+ },++ roomTimerView: {+ backgroundColor: 'rgba(0,0,0,0.8)',+ borderBottomRightRadius: 3,+ borderTopRightRadius: 3,+ height: 28,+ justifyContent: 'center',+ paddingHorizontal: 10},roomName: {color: ColorPalette.white,- fontSize: 17,+ fontSize: 14,fontWeight: '400'},- roomNameWrapper: {- flexDirection: 'column',+ roomNameView: {+ backgroundColor: 'rgba(0,0,0,0.6)',+ borderBottomLeftRadius: 3,+ borderTopLeftRadius: 3,+ height: 28,+ justifyContent: 'center',+ paddingHorizontal: 10+ },++ roomNameContainer: {alignItems: 'center',left: 0,paddingHorizontal: 48,@@ -122,6 +139,11 @@ export default {right: 0},+ roomNameWrapper: {+ alignItems: 'center',+ flexDirection: 'row'+ },+/*** The style of the {@link View} which expands over the whole* {@link Conference} area and splits it between the {@link Filmstrip} anddiff --git a/react/features/conference/components/web/ConferenceTimerDisplay.js b/react/features/conference/components/web/ConferenceTimerDisplay.jsindex 7b4cd7d619..c4d8e85e59 100644--- a/react/features/conference/components/web/ConferenceTimerDisplay.js+++ b/react/features/conference/components/web/ConferenceTimerDisplay.js@@ -1,15 +1,18 @@// @flow+/* eslint-disable no-unused-vars */+import React from 'react';/*** Returns web element to be rendered.** @param {string} timerValue - String to display as time.+ * @param {Object} textStyle - Unused on web.** @returns {ReactElement}*/-export default function renderConferenceTimer(timerValue: string) {+export default function renderConferenceTimer(timerValue: string, textStyle: Object) {return (<span className = 'subject-conference-timer' >{ timerValue }</span>);