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(recording/LiveStream): native ui updates
Calin-Teodord9749f3da6ac
diff --git a/react/features/google-api/components/GoogleSignInButton.native.js b/react/features/google-api/components/GoogleSignInButton.native.jsindex a0525e3434..98177ca07b 100644--- a/react/features/google-api/components/GoogleSignInButton.native.js+++ b/react/features/google-api/components/GoogleSignInButton.native.js@@ -1,9 +1,11 @@// @flowimport React from 'react';-import { Image, Text, TouchableOpacity } from 'react-native';+import { Image, TouchableOpacity } from 'react-native';import { translate } from '../../base/i18n';+import Button from '../../base/ui/components/native/Button';+import { BUTTON_TYPES } from '../../base/ui/constants.native';import AbstractGoogleSignInButton from './AbstractGoogleSignInButton';import styles from './styles';@@ -33,17 +35,16 @@ class GoogleSignInButton extends AbstractGoogleSignInButton {* @returns {ReactElement}*/render() {- const { onClick, signedIn, t } = this.props;+ const { onClick, signedIn } = this.props;if (signedIn) {return (- <TouchableOpacity- onPress = { onClick }- style = { styles.signOutButton } >- <Text style = { styles.signOutButtonText }>- { t('liveStreaming.signOut') }- </Text>- </TouchableOpacity>+ <Button+ accessibilityLabel = 'liveStreaming.signOut'+ labelKey = 'liveStreaming.signOut'+ onClick = { onClick }+ style = { styles.signOutButton }+ type = { BUTTON_TYPES.SECONDARY } />);}diff --git a/react/features/google-api/components/styles.js b/react/features/google-api/components/styles.jsindex 2e10d48846..c51330dc95 100644--- a/react/features/google-api/components/styles.js+++ b/react/features/google-api/components/styles.js@@ -1,6 +1,6 @@// @flow-import { ColorPalette, createStyleSheet } from '../../base/styles';+import { createStyleSheet } from '../../base/styles';/*** For styling explanations, see:@@ -34,22 +34,8 @@ export default createStyleSheet({* Google).*/signOutButton: {- alignItems: 'center',- borderColor: ColorPalette.lightGrey,- borderRadius: 3,- borderWidth: 1,- color: ColorPalette.white,- height: BUTTON_HEIGHT,- justifyContent: 'center'- },-- /**- * Text of the sign out button.- */- signOutButtonText: {- color: ColorPalette.blue,- fontSize: 14,- fontWeight: 'bold'+ alignSelf: 'center',+ maxWidth: 104,+ width: 'auto'}-});diff --git a/react/features/recording/components/LiveStream/native/StreamKeyForm.js b/react/features/recording/components/LiveStream/native/StreamKeyForm.jsindex 06d997bb85..5c9cad9652 100644--- a/react/features/recording/components/LiveStream/native/StreamKeyForm.js+++ b/react/features/recording/components/LiveStream/native/StreamKeyForm.js@@ -1,11 +1,13 @@import React from 'react';-import { Linking, Text, TouchableOpacity, View } from 'react-native';+import { Linking, Text, View } from 'react-native';import { _abstractMapStateToProps } from '../../../../base/dialog';import { translate } from '../../../../base/i18n';import { connect } from '../../../../base/redux';import { StyleType } from '../../../../base/styles';+import Button from '../../../../base/ui/components/native/Button';import Input from '../../../../base/ui/components/native/Input';+import { BUTTON_TYPES } from '../../../../base/ui/constants.native';import AbstractStreamKeyForm, {type Props as AbstractProps} from '../AbstractStreamKeyForm';@@ -54,81 +56,51 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {const { _dialogStyles, t } = this.props;return (- <View style = { styles.formWrapper }>- <Text- style = { [- _dialogStyles.text,- styles.text,- styles.streamKeyInputLabel- ] }>- {- t('dialog.streamKey')- }- </Text>- <Input- customStyles = {{ input: styles.streamKeyInput }}- onChange = { this._onInputChange }- placeholder = { t('liveStreaming.enterStreamKey') }- value = { this.props.value } />- <View style = { styles.formFooter }>- {- this.state.showValidationError- ? <View style = { styles.formFooterItem }>- <Text- style = { [- _dialogStyles.text,- styles.warningText- ] }>- { t('liveStreaming.invalidStreamKey') }- </Text>- </View>- : null- }- <View style = { styles.formFooterItem }>- <TouchableOpacity- onPress = { this._onOpenHelp }- style = { styles.streamKeyHelp } >- <Text- style = { [- _dialogStyles.text,- styles.text- ] }>- {- t('liveStreaming.streamIdHelp')- }- </Text>- </TouchableOpacity>+ <>+ <View style = { styles.formWrapper }>+ <Input+ customStyles = {{ input: styles.streamKeyInput }}+ onChange = { this._onInputChange }+ placeholder = { t('liveStreaming.enterStreamKey') }+ value = { this.props.value } />+ <View style = { styles.formValidation }>+ {+ this.state.showValidationError+ ? <View style = { styles.formValidationItem }>+ <Text+ style = { [+ _dialogStyles.text,+ styles.warningText+ ] }>+ { t('liveStreaming.invalidStreamKey') }+ </Text>+ </View>+ : null+ }+</View></View>- <View>- <TouchableOpacity onPress = { this._onOpenYoutubeTerms }>- <Text- style = { [- _dialogStyles.text,- styles.text,- styles.tcText- ] }>- {- t('liveStreaming.youtubeTerms')- }- </Text>- </TouchableOpacity>- </View>- <View>- <TouchableOpacity onPress = { this._onOpenGooglePrivacyPolicy }>- <Text- style = { [- _dialogStyles.text,- styles.text,- styles.tcText- ] }>- {- t('liveStreaming.googlePrivacyPolicy')- }- </Text>- </TouchableOpacity>+ <View style = { styles.formButtonsWrapper }>+ <Button+ accessibilityLabel = 'liveStreaming.streamIdHelp'+ labelKey = 'liveStreaming.streamIdHelp'+ labelStyle = { styles.buttonLabelStyle }+ onClick = { this._onOpenHelp }+ type = { BUTTON_TYPES.TERTIARY } />+ <Button+ accessibilityLabel = 'liveStreaming.youtubeTerms'+ labelKey = 'liveStreaming.youtubeTerms'+ labelStyle = { styles.buttonLabelStyle }+ onClick = { this._onOpenYoutubeTerms }+ type = { BUTTON_TYPES.TERTIARY } />+ <Button+ accessibilityLabel = 'liveStreaming.googlePrivacyPolicy'+ labelKey = 'liveStreaming.googlePrivacyPolicy'+ labelStyle = { styles.buttonLabelStyle }+ onClick = { this._onOpenGooglePrivacyPolicy }+ type = { BUTTON_TYPES.TERTIARY } /></View>- </View>+ </>);}diff --git a/react/features/recording/components/LiveStream/native/styles.js b/react/features/recording/components/LiveStream/native/styles.jsindex d1dbb51021..f61aded6f8 100644--- a/react/features/recording/components/LiveStream/native/styles.js+++ b/react/features/recording/components/LiveStream/native/styles.js@@ -30,15 +30,25 @@ export default createStyleSheet({/*** Wrapper for the last element in the form.*/- formFooter: {- flexDirection: 'row'+ formValidation: {+ flexDirection: 'row',+ height: BaseTheme.spacing[4]},- /**- * Wrapper for individual children in the last element of the form.- */- formFooterItem: {- flex: 1+ formValidationItem: {+ alignSelf: 'flex-start',+ marginVertical: BaseTheme.spacing[1]+ },++ formButtonsWrapper: {+ alignSelf: 'center',+ display: 'flex',+ maxWidth: 200,+ width: 'auto'+ },++ buttonLabelStyle: {+ color: BaseTheme.palette.link01},/**@@ -73,22 +83,10 @@ export default createStyleSheet({*/streamKeyInput: {alignSelf: 'stretch',- borderColor: BaseTheme.palette.ui05,- borderBottomWidth: 1,color: BaseTheme.palette.text01,- fontSize: 14,- height: 40,- marginBottom: 5,textAlign: 'left'},- /**- * Label for the previous field.- */- streamKeyInputLabel: {- alignSelf: 'flex-start'- },-/*** Custom component to pick a broadcast from the list fetched from Google.*/