fix(Prejoin): Make prejoin name noneditable only when taken from jwt
This commit is contained in:
parent
9290d9fec0
commit
af7c316827
|
@ -4,7 +4,6 @@ import InlineDialog from '@atlaskit/inline-dialog';
|
|||
import React, { Component } from 'react';
|
||||
|
||||
import { getRoomName } from '../../base/conference';
|
||||
import { isNameReadOnly } from '../../base/config';
|
||||
import { translate } from '../../base/i18n';
|
||||
import { Icon, IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../base/icons';
|
||||
import { isVideoMutedByUser } from '../../base/media';
|
||||
|
@ -21,7 +20,8 @@ import {
|
|||
isDeviceStatusVisible,
|
||||
isDisplayNameRequired,
|
||||
isJoinByPhoneButtonVisible,
|
||||
isJoinByPhoneDialogVisible
|
||||
isJoinByPhoneDialogVisible,
|
||||
isPrejoinNameReadOnly
|
||||
} from '../functions';
|
||||
|
||||
import JoinByPhoneDialog from './dialogs/JoinByPhoneDialog';
|
||||
|
@ -401,7 +401,7 @@ function mapStateToProps(state): Object {
|
|||
showDialog: isJoinByPhoneDialogVisible(state),
|
||||
showErrorOnJoin,
|
||||
hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state),
|
||||
readOnlyName: isNameReadOnly(state),
|
||||
readOnlyName: isPrejoinNameReadOnly(state),
|
||||
showCameraPreview: !isVideoMutedByUser(state),
|
||||
videoTrack: getLocalJitsiVideoTrack(state)
|
||||
};
|
||||
|
|
|
@ -36,6 +36,16 @@ export function isDisplayNameRequired(state: Object): boolean {
|
|||
|| state['features/base/config'].requireDisplayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Selector for determining if the display name from prejoin page is read only.
|
||||
*
|
||||
* @param {Object} state - The state of the app.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isPrejoinNameReadOnly(state: Object): boolean {
|
||||
return Boolean(state['features/base/jwt']?.user?.name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Selector for determining if the user has chosen to skip prejoin page.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue