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(live-streaming): add beta tag to mobile
Leonard Kimf97f294d1a68
diff --git a/react/features/base/toolbox/components/ToolboxItem.native.js b/react/features/base/toolbox/components/ToolboxItem.native.jsindex 90bb4213d6..63ac012e71 100644--- a/react/features/base/toolbox/components/ToolboxItem.native.js+++ b/react/features/base/toolbox/components/ToolboxItem.native.js@@ -51,6 +51,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {_renderItem() {const {disabled,+ elementAfter,onClick,showLabel,styles@@ -72,6 +73,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {<Text style = { styles && styles.labelStyle }>{ this.label }</Text>+ { elementAfter }</View>);diff --git a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.js b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.jsindex 1ae8306b02..9b43bd8149 100644--- a/react/features/recording/components/LiveStream/AbstractLiveStreamButton.js+++ b/react/features/recording/components/LiveStream/AbstractLiveStreamButton.js@@ -1,11 +1,13 @@// @flow+import React from 'react';import { openDialog } from '../../../base/dialog';import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';import {isLocalParticipantModerator,getLocalParticipant} from '../../../base/participants';+import { Container, Text } from '../../../base/react';import {AbstractButton,type AbstractButtonProps@@ -15,6 +17,7 @@ import { getActiveSession } from '../../functions';import StartLiveStreamDialog from './StartLiveStreamDialog';import StopLiveStreamDialog from './StopLiveStreamDialog';+import styles from './styles';/*** The type of the React {@code Component} props of@@ -47,6 +50,26 @@ export default class AbstractLiveStreamButton<P: Props>label = 'dialog.startLiveStreaming';toggledLabel = 'dialog.stopLiveStreaming';+ /**+ * Helper function to be implemented by subclasses, which returns+ * a React Element to display (a beta tag) at the end of the button.+ *+ * @override+ * @protected+ * @returns {ReactElement}+ */+ _getElementAfter() {+ return (+ <Container+ className = { 'beta-tag' }+ style = { styles && { ...styles.betaTag } }>+ <Text style = { styles && { ...styles.betaTagText } }>+ { this.props.t('recording.beta') }+ </Text>+ </Container>+ );+ }+/*** Handles clicking / pressing the button.*diff --git a/react/features/recording/components/LiveStream/LiveStreamButton.web.js b/react/features/recording/components/LiveStream/LiveStreamButton.web.jsindex 640c775eb3..df508fa223 100644--- a/react/features/recording/components/LiveStream/LiveStreamButton.web.js+++ b/react/features/recording/components/LiveStream/LiveStreamButton.web.js@@ -1,6 +1,5 @@// @flow-import React from 'react';import { connect } from 'react-redux';import { translate } from '../../../base/i18n';@@ -57,22 +56,6 @@ class LiveStreamButton extends AbstractLiveStreamButton<Props> {this.tooltip = newProps._liveStreamDisabledTooltipKey;}- /**- * Helper function to be implemented by subclasses, which returns- * a React Element to display (a beta tag) at the end of the button.- *- * @override- * @protected- * @returns {boolean}- */- _getElementAfter() {- return (- <span className = 'beta-tag'>- { this.props.t('recording.beta') }- </span>- );- }-/*** Helper function to be implemented by subclasses, which must return a* boolean value indicating if this button is disabled or not.diff --git a/react/features/recording/components/LiveStream/styles.js b/react/features/recording/components/LiveStream/styles.native.jssimilarity index 54%rename from react/features/recording/components/LiveStream/styles.jsrename to react/features/recording/components/LiveStream/styles.native.jsindex fa08b8f875..a4e15fcf79 100644--- a/react/features/recording/components/LiveStream/styles.js+++ b/react/features/recording/components/LiveStream/styles.native.js@@ -1,11 +1,24 @@// @flow-import { BoxModel, createStyleSheet } from '../../../base/styles';+import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';/*** The styles of the React {@code Components} of LiveStream.*/export default createStyleSheet({+ betaTag: {+ backgroundColor: ColorPalette.darkGrey,+ borderRadius: 2,+ marginLeft: 16,+ opacity: 0.90,+ paddingLeft: 6,+ paddingRight: 6+ },++ betaTagText: {+ color: ColorPalette.white,+ fontWeight: 'bold'+ },streamKeyFormWrapper: {flexDirection: 'column',diff --git a/react/features/recording/components/LiveStream/styles.web.js b/react/features/recording/components/LiveStream/styles.web.jsnew file mode 100644index 0000000000..e69de29bb2diff --git a/react/features/toolbox/components/native/styles.js b/react/features/toolbox/components/native/styles.jsindex 1b4b17569b..baa945f4cf 100644--- a/react/features/toolbox/components/native/styles.js+++ b/react/features/toolbox/components/native/styles.js@@ -180,7 +180,7 @@ const overflowMenuStyles = createStyleSheet({* {@code OverflowMenu}.*/label: {- flex: 1,+ flexShrink: 1,fontSize: 16,marginLeft: 32,opacity: 0.90