mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
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 PhoneNumbers = sdk.getComponent("views.settings.discovery.PhoneNumbers");
|
||||||
const SetIdServer = sdk.getComponent("views.settings.SetIdServer");
|
const SetIdServer = sdk.getComponent("views.settings.SetIdServer");
|
||||||
|
|
||||||
|
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 (
|
return (
|
||||||
<div className="mx_SettingsTab_section">
|
<div className="mx_SettingsTab_section">
|
||||||
<span className="mx_SettingsTab_subheading">{_t("Email addresses")}</span>
|
{threepidSection}
|
||||||
<EmailAddresses />
|
|
||||||
|
|
||||||
<span className="mx_SettingsTab_subheading">{_t("Phone numbers")}</span>
|
|
||||||
<PhoneNumbers />
|
|
||||||
{ /* has its own heading as it includes the current ID server */ }
|
{ /* has its own heading as it includes the current ID server */ }
|
||||||
<SetIdServer />
|
<SetIdServer />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue