Procházet zdrojové kódy

fix: login improvement (#941)

tags/0.3.15
Matri před 2 roky
rodič
revize
062e2e915b
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 3
- 0
web/app/components/base/button/index.tsx Zobrazit soubor

className?: string className?: string
disabled?: boolean disabled?: boolean
loading?: boolean loading?: boolean
tabIndex?: number
children: React.ReactNode children: React.ReactNode
onClick?: MouseEventHandler<HTMLDivElement> onClick?: MouseEventHandler<HTMLDivElement>
} }
className, className,
onClick, onClick,
loading = false, loading = false,
tabIndex,
}) => { }) => {
let style = 'cursor-pointer' let style = 'cursor-pointer'
switch (type) { switch (type) {
return ( return (
<div <div
className={`inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base ${style} ${className && className}`} className={`inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base ${style} ${className && className}`}
tabIndex={tabIndex}
onClick={disabled ? undefined : onClick} onClick={disabled ? undefined : onClick}
> >
{children} {children}

+ 5
- 0
web/app/signin/normalForm.tsx Zobrazit soubor

id="password" id="password"
value={password} value={password}
onChange={e => setPassword(e.target.value)} onChange={e => setPassword(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter')
handleEmailPasswordLogin()
}}
type={showPassword ? 'text' : 'password'} type={showPassword ? 'text' : 'password'}
autoComplete="current-password" autoComplete="current-password"
placeholder={t('login.passwordPlaceholder') || ''} placeholder={t('login.passwordPlaceholder') || ''}


<div className='mb-2'> <div className='mb-2'>
<Button <Button
tabIndex={0}
type='primary' type='primary'
onClick={handleEmailPasswordLogin} onClick={handleEmailPasswordLogin}
disabled={isLoading} disabled={isLoading}

Načítá se…
Zrušit
Uložit