Explorar el Código

Add feature flag to hide the participant name editing field on the prejoin page

factor2
Bartosz Schiller hace 2 años
padre
commit
5201f8791a

+ 6
- 0
react/features/base/flags/constants.ts Ver fichero

@@ -172,6 +172,12 @@ export const PIP_WHILE_SCREEN_SHARING_ENABLED = 'pip-while-screen-sharing.enable
172 172
  */
173 173
 export const PREJOIN_PAGE_ENABLED = 'prejoinpage.enabled';
174 174
 
175
+/**
176
+ * Flag indicating if the participant name editing field should be displayed on the prejoin page.
177
+ * Default: disabled (false).
178
+ */
179
+export const PREJOIN_PAGE_HIDE_DISPLAY_NAME = 'prejoinpage.hideDisplayName';
180
+
175 181
 /**
176 182
  * Flag indicating if raise hand feature should be enabled.
177 183
  * Default: enabled.

+ 13
- 6
react/features/prejoin/components/native/Prejoin.tsx Ver fichero

@@ -19,6 +19,8 @@ import { IReduxState } from '../../../app/types';
19 19
 import { setAudioOnly } from '../../../base/audio-only/actions';
20 20
 import { getConferenceName } from '../../../base/conference/functions';
21 21
 import { connect } from '../../../base/connection/actions.native';
22
+import { PREJOIN_PAGE_HIDE_DISPLAY_NAME } from '../../../base/flags/constants';
23
+import { getFeatureFlag } from '../../../base/flags/functions';
22 24
 import { IconCloseLarge } from '../../../base/icons/svg';
23 25
 // @ts-ignore
24 26
 import JitsiScreen from '../../../base/modal/components/JitsiScreen';
@@ -58,6 +60,8 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
58 60
     );
59 61
     const localParticipant = useSelector((state: IReduxState) => getLocalParticipant(state));
60 62
     const isDisplayNameMandatory = useSelector((state: IReduxState) => isDisplayNameRequired(state));
63
+    const isDisplayNameVisible
64
+        = useSelector((state: IReduxState) => !getFeatureFlag(state, PREJOIN_PAGE_HIDE_DISPLAY_NAME, false));
61 65
     const roomName = useSelector((state: IReduxState) => getConferenceName(state));
62 66
     const participantName = localParticipant?.name;
63 67
     const [ displayName, setDisplayName ]
@@ -166,12 +170,15 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
166 170
                         // @ts-ignore
167 171
                         styles = { styles.buttonStylesBorderless } />
168 172
                 </View>
169
-                <Input
170
-                    // @ts-ignore
171
-                    customStyles = {{ input: styles.customInput }}
172
-                    onChange = { onChangeDisplayName }
173
-                    placeholder = { t('dialog.enterDisplayName') }
174
-                    value = { displayName } />
173
+                {
174
+                    isDisplayNameVisible
175
+                    && <Input
176
+                        // @ts-ignore
177
+                        customStyles = {{ input: styles.customInput }}
178
+                        onChange = { onChangeDisplayName }
179
+                        placeholder = { t('dialog.enterDisplayName') }
180
+                        value = { displayName } />
181
+                }
175 182
                 <Button
176 183
                     accessibilityLabel = 'prejoin.joinMeeting'
177 184
                     disabled = { joinButtonDisabled }

Loading…
Cancelar
Guardar