Merge pull request #3322 from matrix-org/jryans/discovery-without-is
Improve Discovery section when no IS setpull/21833/head
commit
f9e223aec7
|
@ -95,8 +95,9 @@ export default class SetIdServer extends React.Component {
|
|||
}
|
||||
|
||||
this.state = {
|
||||
defaultIdServer,
|
||||
currentClientIdServer: MatrixClientPeg.get().getIdentityServerUrl(),
|
||||
idServer: defaultIdServer,
|
||||
idServer: "",
|
||||
error: null,
|
||||
busy: false,
|
||||
disconnectBusy: false,
|
||||
|
@ -265,7 +266,10 @@ export default class SetIdServer extends React.Component {
|
|||
</span>
|
||||
<Field label={_t("Identity Server")}
|
||||
id="mx_SetIdServer_idServer"
|
||||
type="text" value={this.state.idServer} autoComplete="off"
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
placeholder={this.state.defaultIdServer}
|
||||
value={this.state.idServer}
|
||||
onChange={this._onIdentityServerChanged}
|
||||
tooltipContent={this._getTooltip()}
|
||||
/>
|
||||
|
|
|
@ -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");
|
||||
|
||||
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">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Email addresses")}</span>
|
||||
<EmailAddresses />
|
||||
|
||||
<span className="mx_SettingsTab_subheading">{_t("Phone numbers")}</span>
|
||||
<PhoneNumbers />
|
||||
{threepidSection}
|
||||
{ /* has its own heading as it includes the current ID server */ }
|
||||
<SetIdServer />
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue