Skip to content

Commit 4492cc9

Browse files
committed
Fixed alert style mismatches
1 parent 033d7d0 commit 4492cc9

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

static/app/components/apps/User/pages/LoginPage.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import {withRouter} from 'react-router-dom';
66
import {loginUser} from './auth/actions';
77
import Login from './auth/Login';
88

9-
import {forgotPassword} from '~/data/User';
10-
119
class LoginPage extends React.Component {
1210
static propTypes = {
1311
history: PropTypes.object.isRequired,

static/app/components/apps/User/pages/auth/Login.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Login extends React.Component {
7575
renderErrorAlert() {
7676
if (this.props.errorMessage) {
7777
return (
78-
<div className="user-login__error">
78+
<div className="user-login__error user-login__alert">
7979
<Alert color="danger" isOpen={this.state.isErrorVisible}
8080
toggle={this.dismissError}>
8181
{this.props.errorMessage}

static/app/data/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const promisify = (request) => {
1212
return deferred.reject(new Error(res.body.error));
1313
}
1414
if (err.status === 401) {
15-
return deferred.reject(new Error('Username or Password was incorrect'));
15+
return deferred.reject(new Error('Username or Password was incorrect. Have you confirmed your account?'));
1616
}
1717
return deferred.reject(new Error(err));
1818
}

static/assets/scss/components/_user-login.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@
5353
}
5454
}
5555

56-
&__error {
57-
font-family: $header-font-family;
58-
}
59-
6056
&__forgot {
6157
font-family: $header-font-family;
6258
}
@@ -81,4 +77,8 @@
8177
&__alerts {
8278
width: 100%;
8379
}
80+
81+
&__alert {
82+
font-family: $header-font-family;
83+
}
8484
}

static/assets/scss/vendors-extensions/_bootstrap.scss

+9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
$brand-primary: $primary-color;
2+
23
$alert-danger-bg: $accent-red;
34
$alert-danger-text: $white;
45
$alert-danger-border: darken($alert-danger-bg, 5%);
56

7+
$alert-success-bg: $accent-green;
8+
$alert-success-text: $white;
9+
$alert-success-border: darken($alert-success-bg, 5%);
10+
611
body {
712
background-color: $body-background;
813
}
@@ -61,4 +66,8 @@ body {
6166

6267
.alert-danger {
6368
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
69+
}
70+
71+
.alert-success {
72+
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
6473
}

0 commit comments

Comments
 (0)