Compare commits

...

2 Commits

Author SHA1 Message Date
hmuresan
c20a55e155 fix 2021-12-13 17:07:50 +02:00
hmuresan
b3f90d1b40 feat(profile-settings): Hide email field under profile settings 2021-12-13 17:05:59 +02:00
5 changed files with 16 additions and 4 deletions

View File

@@ -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,

View File

@@ -48,7 +48,7 @@
}
.profile-edit-field {
flex: 1;
flex: .5;
}
.settings-sub-pane {
flex: 1;

View File

@@ -165,6 +165,7 @@ export default [
'hideConferenceTimer',
'hiddenDomain',
'hideAddRoomButton',
'hideEmailInSettings',
'hideLobbyButton',
'hosts',
'iAmRecorder',

View File

@@ -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

View File

@@ -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
};
}