mirror of
https://github.com/plankanban/planka.git
synced 2025-08-05 13:35:27 +02:00
feat: Ability to show detailed auth errors, set to false by default (#860)
This commit is contained in:
parent
b2e1fba9a0
commit
e6644eb745
7 changed files with 29 additions and 2 deletions
|
@ -18,6 +18,11 @@ const createMessage = (error) => {
|
|||
}
|
||||
|
||||
switch (error.message) {
|
||||
case 'Invalid credentials':
|
||||
return {
|
||||
type: 'error',
|
||||
content: 'common.invalidCredentials',
|
||||
};
|
||||
case 'Invalid email or username':
|
||||
return {
|
||||
type: 'error',
|
||||
|
@ -116,6 +121,7 @@ const Login = React.memo(
|
|||
useEffect(() => {
|
||||
if (wasSubmitting && !isSubmitting && error) {
|
||||
switch (error.message) {
|
||||
case 'Invalid credentials':
|
||||
case 'Invalid email or username':
|
||||
emailOrUsernameField.current.select();
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ export default {
|
|||
common: {
|
||||
emailOrUsername: 'E-mail or username',
|
||||
invalidEmailOrUsername: 'Invalid e-mail or username',
|
||||
invalidCredentials: 'Invalid credentials',
|
||||
invalidPassword: 'Invalid password',
|
||||
logInToPlanka: 'Log in to Planka',
|
||||
noInternetConnection: 'No internet connection',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue