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