feat(profile-settings): Hide email field under profile settings
This commit is contained in:
parent
40844afb60
commit
70d8a46c05
|
@ -484,6 +484,9 @@ var config = {
|
|||
// Disables profile and the edit of all fields from the profile settings (display name and email)
|
||||
// disableProfile: false,
|
||||
|
||||
// Hides the email section under profile settings.
|
||||
// hideEmailInSettings: false,
|
||||
|
||||
// Whether or not some features are checked based on token.
|
||||
// enableFeaturesBasedOnToken: false,
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
|
||||
.profile-edit-field {
|
||||
flex: 1;
|
||||
flex: .5;
|
||||
}
|
||||
.settings-sub-pane {
|
||||
flex: 1;
|
||||
|
|
|
@ -165,6 +165,7 @@ export default [
|
|||
'hideConferenceTimer',
|
||||
'hiddenDomain',
|
||||
'hideAddRoomButton',
|
||||
'hideEmailInSettings',
|
||||
'hideLobbyButton',
|
||||
'hosts',
|
||||
'iAmRecorder',
|
||||
|
|
|
@ -53,6 +53,11 @@ export type Props = {
|
|||
*/
|
||||
readOnlyName: boolean,
|
||||
|
||||
/**
|
||||
* Whether to hide the email input in the profile settings.
|
||||
*/
|
||||
hideEmailInSettings?: boolean,
|
||||
|
||||
/**
|
||||
* Invoked to obtain translated strings.
|
||||
*/
|
||||
|
@ -137,6 +142,7 @@ class ProfileTab extends AbstractDialogTab<Props> {
|
|||
displayName,
|
||||
disableSelfView,
|
||||
email,
|
||||
hideEmailInSettings,
|
||||
readOnlyName,
|
||||
t
|
||||
} = this.props;
|
||||
|
@ -157,7 +163,7 @@ class ProfileTab extends AbstractDialogTab<Props> {
|
|||
type = 'text'
|
||||
value = { displayName } />
|
||||
</div>
|
||||
<div className = 'profile-edit-field'>
|
||||
{!hideEmailInSettings && <div className = 'profile-edit-field'>
|
||||
<FieldTextStateless
|
||||
compact = { true }
|
||||
id = 'setEmail'
|
||||
|
@ -167,7 +173,7 @@ class ProfileTab extends AbstractDialogTab<Props> {
|
|||
shouldFitContainer = { true }
|
||||
type = 'text'
|
||||
value = { email } />
|
||||
</div>
|
||||
</div>}
|
||||
</div>
|
||||
<br />
|
||||
<Checkbox
|
||||
|
|
|
@ -155,6 +155,7 @@ export function getProfileTabProps(stateful: Object | Function) {
|
|||
authLogin,
|
||||
conference
|
||||
} = state['features/base/conference'];
|
||||
const { hideEmailInSettings } = state['features/base/config'];
|
||||
const localParticipant = getLocalParticipant(state);
|
||||
const { disableSelfView } = state['features/base/settings'];
|
||||
|
||||
|
@ -164,7 +165,8 @@ export function getProfileTabProps(stateful: Object | Function) {
|
|||
displayName: localParticipant.name,
|
||||
disableSelfView: Boolean(disableSelfView),
|
||||
email: localParticipant.email,
|
||||
readOnlyName: isNameReadOnly(state)
|
||||
readOnlyName: isNameReadOnly(state),
|
||||
hideEmailInSettings
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue