Merge pull request #3322 from matrix-org/jryans/discovery-without-is

Improve Discovery section when no IS set
pull/21833/head
J. Ryan Stinnett 2019-08-19 15:02:11 +01:00 committed by GitHub
commit f9e223aec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -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()}
/>

View File

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