hide login options for status

This commit is contained in:
Matthew Hodgson 2017-10-25 01:30:09 +01:00
parent 59b2189909
commit adbea44d70

View file

@ -20,7 +20,7 @@ import classNames from 'classnames';
import sdk from '../../../index'; import sdk from '../../../index';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import {field_input_incorrect} from '../../../UiEffects'; import {field_input_incorrect} from '../../../UiEffects';
import UserSettingsStore from '../../../UserSettingsStore';
/** /**
* A pure UI component which displays a username/password form. * A pure UI component which displays a username/password form.
@ -210,9 +210,10 @@ class PasswordLogin extends React.Component {
const loginField = this.renderLoginField(this.state.loginType, matrixIdText === ''); const loginField = this.renderLoginField(this.state.loginType, matrixIdText === '');
return ( const theme = UserSettingsStore.getTheme();
<div> let loginType;
<form onSubmit={this.onSubmitForm}> if (theme !== 'status') {
loginType = (
<div className="mx_Login_type_container"> <div className="mx_Login_type_container">
<label className="mx_Login_type_label">{ _t('Sign in with') }</label> <label className="mx_Login_type_label">{ _t('Sign in with') }</label>
<Dropdown <Dropdown
@ -225,6 +226,13 @@ class PasswordLogin extends React.Component {
<span key={PasswordLogin.LOGIN_FIELD_PHONE}>{ _t('Phone') }</span> <span key={PasswordLogin.LOGIN_FIELD_PHONE}>{ _t('Phone') }</span>
</Dropdown> </Dropdown>
</div> </div>
);
}
return (
<div>
<form onSubmit={this.onSubmitForm}>
{ loginType }
{ loginField } { loginField }
<input className={pwFieldClass} ref={(e) => {this._passwordField = e;}} type="password" <input className={pwFieldClass} ref={(e) => {this._passwordField = e;}} type="password"
name="password" name="password"