parent
9c7f6249a4
commit
5eb0856260
|
@ -109,19 +109,16 @@ export const LoginForm = () => {
|
|||
if (error instanceof ApiError) {
|
||||
if (error.code === 'email_not_confirmed') {
|
||||
setSubmitError(t('Please, confirm email'))
|
||||
|
||||
setIsEmailNotConfirmed(true)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (error.code === 'user_not_found') {
|
||||
setSubmitError(t('Something went wrong, check email and password'))
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
setSubmitError(error.message)
|
||||
} finally {
|
||||
setIsSubmitting(false)
|
||||
|
@ -197,15 +194,15 @@ export const LoginForm = () => {
|
|||
</button>
|
||||
</div>
|
||||
<div class={styles.authActions}>
|
||||
<a
|
||||
href="#"
|
||||
<span
|
||||
class={'link'}
|
||||
onClick={(ev) => {
|
||||
ev.preventDefault()
|
||||
changeSearchParam('mode', 'forgot-password')
|
||||
}}
|
||||
>
|
||||
{t('Forgot password?')}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -192,14 +192,16 @@ h5 {
|
|||
a,
|
||||
a:hover,
|
||||
a:visited,
|
||||
a:link {
|
||||
a:link,
|
||||
.link {
|
||||
border-bottom: 1px solid rgb(0 0 0 / 30%);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a:visited,
|
||||
a:link {
|
||||
a:link,
|
||||
.link {
|
||||
color: var(--link-color);
|
||||
padding-bottom: 0.1em;
|
||||
transition: color 0.2s, background-color 0.2s;
|
||||
|
|
|
@ -77,7 +77,10 @@ export const apiClient = {
|
|||
const response = await publicGraphQLClient.query(authLoginQuery, { email, password }).toPromise()
|
||||
// console.debug('[api-client] authLogin', { response })
|
||||
if (response.error) {
|
||||
if (response.error.message === '[GraphQL] User not found') {
|
||||
if (
|
||||
response.error.message === '[GraphQL] User not found' ||
|
||||
response.error.message === "[GraphQL] 'dict' object has no attribute 'id'"
|
||||
) {
|
||||
throw new ApiError('user_not_found')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user