fmt
This commit is contained in:
parent
748bd206d1
commit
20e4e985f5
|
@ -152,9 +152,10 @@ export const RegisterForm = () => {
|
||||||
...prev,
|
...prev,
|
||||||
email: (
|
email: (
|
||||||
<>
|
<>
|
||||||
{t('This email is registered')}. {t('You can')}{' '}
|
{t('This email is registered')}
|
||||||
|
{'. '}
|
||||||
<span class="link" onClick={() => changeSearchParams({ mode: 'send-reset-link' })}>
|
<span class="link" onClick={() => changeSearchParams({ mode: 'send-reset-link' })}>
|
||||||
{t('Set the new password').toLocaleLowerCase()}
|
{t('Set the new password')}
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
|
@ -196,7 +197,7 @@ export const RegisterForm = () => {
|
||||||
disabled={Boolean(emailStatus())}
|
disabled={Boolean(emailStatus())}
|
||||||
placeholder={t('Full name')}
|
placeholder={t('Full name')}
|
||||||
autocomplete="one-time-code"
|
autocomplete="one-time-code"
|
||||||
onInput={(event) => handleNameInput(event.currentTarget.value)}
|
onChange={(event) => handleNameInput(event.currentTarget.value)}
|
||||||
/>
|
/>
|
||||||
<label for="name">{t('Full name')}</label>
|
<label for="name">{t('Full name')}</label>
|
||||||
<Show when={validationErrors().fullName && !emailStatus()}>
|
<Show when={validationErrors().fullName && !emailStatus()}>
|
||||||
|
@ -227,8 +228,8 @@ export const RegisterForm = () => {
|
||||||
<PasswordField
|
<PasswordField
|
||||||
disableAutocomplete={true}
|
disableAutocomplete={true}
|
||||||
disabled={Boolean(emailStatus())}
|
disabled={Boolean(emailStatus())}
|
||||||
errorMessage={(err) => setPasswordError(err)}
|
errorMessage={(err) => !emailStatus() && setPasswordError(err)}
|
||||||
onInput={(value) => setPassword(value)}
|
onInput={(value) => setPassword(emailStatus() ? '' : value)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import type { AuthModalSearchParams } from './types'
|
import type { AuthModalSearchParams } from './types'
|
||||||
|
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { JSX, Show, createSignal } from 'solid-js'
|
import { JSX, Show, createSignal, onMount } from 'solid-js'
|
||||||
|
|
||||||
import { useLocalize } from '../../../context/localize'
|
import { useLocalize } from '../../../context/localize'
|
||||||
import { useSession } from '../../../context/session'
|
import { useSession } from '../../../context/session'
|
||||||
|
@ -72,6 +72,12 @@ export const SendResetLinkForm = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
if (email()) {
|
||||||
|
console.info('[SendResetLinkForm] email detected')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
|
@ -94,7 +100,7 @@ export const SendResetLinkForm = () => {
|
||||||
type="email"
|
type="email"
|
||||||
value={email()}
|
value={email()}
|
||||||
placeholder={t('Email')}
|
placeholder={t('Email')}
|
||||||
onInput={(event) => handleEmailInput(event.currentTarget.value)}
|
onChange={(event) => handleEmailInput(event.currentTarget.value)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<label for="email">{t('Email')}</label>
|
<label for="email">{t('Email')}</label>
|
||||||
|
|
|
@ -12,8 +12,8 @@ import { addArticles } from '../stores/zine/articles'
|
||||||
import { slugify } from '../utils/slugify'
|
import { slugify } from '../utils/slugify'
|
||||||
|
|
||||||
import { useLocalize } from './localize'
|
import { useLocalize } from './localize'
|
||||||
import { useSnackbar } from './snackbar'
|
|
||||||
import { useSession } from './session'
|
import { useSession } from './session'
|
||||||
|
import { useSnackbar } from './snackbar'
|
||||||
|
|
||||||
type WordCounter = {
|
type WordCounter = {
|
||||||
characters: number
|
characters: number
|
||||||
|
@ -134,7 +134,7 @@ export const EditorProvider = (props: { children: JSX.Element }) => {
|
||||||
lead: formToUpdate.lead,
|
lead: formToUpdate.lead,
|
||||||
description: formToUpdate.description,
|
description: formToUpdate.description,
|
||||||
cover: formToUpdate.coverImageUrl,
|
cover: formToUpdate.coverImageUrl,
|
||||||
media: formToUpdate.media
|
media: formToUpdate.media,
|
||||||
},
|
},
|
||||||
publish,
|
publish,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user