diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-01-16 15:30:44 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-01-17 14:24:31 +0100 |
| commit | bf14af220b7af5f02e8e6f66734ab8c8eea020bf (patch) | |
| tree | c242d34369ffb9de24d51924752c23f27d076aa2 | |
| parent | 0124c7e85e305299f7ff7940280cbfd4353a0f48 (diff) | |
| download | mullvadvpn-bf14af220b7af5f02e8e6f66734ab8c8eea020bf.tar.xz mullvadvpn-bf14af220b7af5f02e8e6f66734ab8c8eea020bf.zip | |
Update the "login successful" message
| -rw-r--r-- | gui/packages/desktop/src/renderer/components/Login.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gui/packages/desktop/src/renderer/components/Login.js b/gui/packages/desktop/src/renderer/components/Login.js index e0491141a7..f1ce7542c7 100644 --- a/gui/packages/desktop/src/renderer/components/Login.js +++ b/gui/packages/desktop/src/renderer/components/Login.js @@ -101,7 +101,7 @@ export default class Login extends Component<Props, State> { {this._getStatusIcon()} <Text style={styles.title}>{this._formTitle()}</Text> - {this._shouldShowLoginForm() && <View>{this._createLoginForm()}</View>} + {this._createLoginForm()} </View> <Animated.View @@ -209,7 +209,7 @@ export default class Login extends Component<Props, State> { case 'failed': return 'Login failed'; case 'ok': - return 'Login successful'; + return 'Logged in'; default: return 'Login'; } @@ -222,6 +222,8 @@ export default class Login extends Component<Props, State> { return (loginError && loginError.message) || 'Unknown error'; case 'logging in': return 'Checking account number'; + case 'ok': + return 'Correct account number'; default: return 'Enter your account number'; } @@ -259,6 +261,7 @@ export default class Login extends Component<Props, State> { switch (this.props.loginState) { case 'logging in': + case 'ok': classes.push(styles.account_input_group__inactive); break; case 'failed': @@ -272,7 +275,7 @@ export default class Login extends Component<Props, State> { _accountInputButtonStyles(): Array<Object> { const classes = [styles.input_button]; - if (this.props.loginState === 'logging in') { + if (this.props.loginState === 'logging in' || this.props.loginState === 'ok') { classes.push(styles.input_button__invisible); } @@ -298,8 +301,8 @@ export default class Login extends Component<Props, State> { } _shouldEnableAccountInput() { - // enable account input always except when "logging in" - return this.props.loginState !== 'logging in'; + // enable account input always except when "logging in" or "logged in" + return this.props.loginState !== 'logging in' && this.props.loginState !== 'ok'; } _shouldShowAccountHistory() { @@ -310,10 +313,6 @@ export default class Login extends Component<Props, State> { ); } - _shouldShowLoginForm() { - return this.props.loginState !== 'ok'; - } - _shouldShowFooter() { return ( (this.props.loginState === 'none' || this.props.loginState === 'failed') && |
