replace some of the status.im theme with general config options
This commit is contained in:
parent
a0cdaf29f9
commit
2827bc0718
7 changed files with 37 additions and 24 deletions
|
@ -20,7 +20,7 @@ import classNames from 'classnames';
|
|||
import sdk from '../../../index';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import {field_input_incorrect} from '../../../UiEffects';
|
||||
import UserSettingsStore from '../../../UserSettingsStore';
|
||||
import SdkConfig from '../../../SdkConfig';
|
||||
|
||||
/**
|
||||
* A pure UI component which displays a username/password form.
|
||||
|
@ -122,8 +122,6 @@ class PasswordLogin extends React.Component {
|
|||
mx_Login_field_disabled: disabled,
|
||||
};
|
||||
|
||||
const theme = UserSettingsStore.getTheme();
|
||||
|
||||
switch(loginType) {
|
||||
case PasswordLogin.LOGIN_FIELD_EMAIL:
|
||||
classes.mx_Login_email = true;
|
||||
|
@ -146,7 +144,10 @@ class PasswordLogin extends React.Component {
|
|||
type="text"
|
||||
name="username" // make it a little easier for browser's remember-password
|
||||
onChange={this.onUsernameChanged}
|
||||
placeholder={theme === 'status' ? "Username on matrix.status.im" : _t("User name")}
|
||||
placeholder={ SdkConfig.get().disable_custom_urls ?
|
||||
_t("Username on %(hs)s", {
|
||||
hs: this.props.hsUrl.replace(/^https?:\/\//, '')
|
||||
}) : _t("User name")}
|
||||
value={this.state.username}
|
||||
autoFocus
|
||||
disabled={disabled}
|
||||
|
@ -212,9 +213,8 @@ class PasswordLogin extends React.Component {
|
|||
|
||||
const loginField = this.renderLoginField(this.state.loginType, matrixIdText === '');
|
||||
|
||||
const theme = UserSettingsStore.getTheme();
|
||||
let loginType;
|
||||
if (theme !== 'status') {
|
||||
if (!SdkConfig.get().disable_3pid_login) {
|
||||
loginType = (
|
||||
<div className="mx_Login_type_container">
|
||||
<label className="mx_Login_type_label">{ _t('Sign in with') }</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue