Hide 3PID discovery sections when no identity server
This hides the email and phone sections of Discovery in the Settings when there is no IS, as they can't meaningfully be used. Part of https://github.com/vector-im/riot-web/issues/10528
This commit is contained in:
parent
cd26b73386
commit
07826c5675
1 changed files with 9 additions and 5 deletions
|
@ -189,13 +189,17 @@ export default class GeneralUserSettingsTab extends React.Component {
|
|||
const PhoneNumbers = sdk.getComponent("views.settings.discovery.PhoneNumbers");
|
||||
const SetIdServer = sdk.getComponent("views.settings.SetIdServer");
|
||||
|
||||
return (
|
||||
<div className="mx_SettingsTab_section">
|
||||
const threepidSection = this.state.haveIdServer ? <div>
|
||||
<span className="mx_SettingsTab_subheading">{_t("Email addresses")}</span>
|
||||
<EmailAddresses />
|
||||
|
||||
<span className="mx_SettingsTab_subheading">{_t("Phone numbers")}</span>
|
||||
<PhoneNumbers />
|
||||
</div> : null;
|
||||
|
||||
return (
|
||||
<div className="mx_SettingsTab_section">
|
||||
{threepidSection}
|
||||
{ /* has its own heading as it includes the current ID server */ }
|
||||
<SetIdServer />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue