fix translates and visual bugs
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { useTranslations } from 'next-intl'
|
||||
import LogoIcon from '@/app/ui/logo-icon';
|
||||
import styles from '@/app/styles/login.module.scss';
|
||||
import Link from 'next/link';
|
||||
import RegisterForm from '@/app/ui/forms/register-form';
|
||||
import LanguageSwitcher from '@/app/components/LanguageSwitcher';
|
||||
import ForgotPasswordForm from '@/app/ui/forms/forgot-password-form';
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations('Login-register-form');
|
||||
|
||||
return (
|
||||
<div className={`${styles['login-container-wrapper']}`}>
|
||||
<div className={`${styles['login-container-language']}`}>
|
||||
<LanguageSwitcher />
|
||||
</div>
|
||||
<div className={`${styles['login-container']}`}>
|
||||
<div className={`${styles['logo']}`}>
|
||||
<LogoIcon />
|
||||
<h1>NO COPY</h1>
|
||||
<p>
|
||||
{t('recover-password')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<ForgotPasswordForm/>
|
||||
|
||||
<div className={`${styles['register-link']}`}>
|
||||
<p>{t('already-have-an-account')}? <Link href="login">{t('login')}</Link></p>
|
||||
</div>
|
||||
<div className={`${styles['register-link']}`}>
|
||||
<p>{t('no-account')}?
|
||||
<Link href="register"> {t('register')}</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -230,7 +230,7 @@ export async function registration(
|
||||
const errors: Record<string, string> = {};
|
||||
switch (error) {
|
||||
case '1':
|
||||
errors['server'] = 'email-already-registered'
|
||||
errors['server'] = 'email-or-already-registered'
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -340,7 +340,7 @@ export default function TanstakFilesTable() {
|
||||
{/* Фильтры */}
|
||||
<div className="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 p-4">
|
||||
<div className="flex flex-col md:flex-row gap-4 w-full md:w-auto">
|
||||
<div className="flex flex-col w-40">
|
||||
<div className="flex flex-col w-50">
|
||||
<div className="text-sm font-medium mb-1">{t('date-filter')}:</div>
|
||||
<DropDownList
|
||||
value={(() => {
|
||||
@@ -377,7 +377,7 @@ export default function TanstakFilesTable() {
|
||||
</DropDownList>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col w-40">
|
||||
<div className="flex flex-col w-50">
|
||||
<div className="text-sm font-medium mb-1">{t('type-filter')}:</div>
|
||||
<DropDownList
|
||||
value={(() => {
|
||||
@@ -474,7 +474,7 @@ export default function TanstakFilesTable() {
|
||||
</div>
|
||||
|
||||
{/* Пагинация */}
|
||||
<div className="flex flex-col md:flex-row items-center justify-between mt-6 gap-4">
|
||||
<div className="flex flex-col md:flex-row items-end justify-between mt-6 gap-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-sm text-gray-700">
|
||||
{t('page')}{' '}
|
||||
|
||||
@@ -22,4 +22,11 @@ h4 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
svg:focus,
|
||||
g:focus,
|
||||
path:focus {
|
||||
outline: none;
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
@import "tailwindcss";
|
||||
@@ -0,0 +1,53 @@
|
||||
'use client'
|
||||
|
||||
import styles from '@/app/styles/login.module.scss'
|
||||
import { useActionState, useState } from 'react';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function ForgotPasswordForm() {
|
||||
const [state, formAction, isPending] = useActionState(
|
||||
() => {
|
||||
console.log("test");
|
||||
},
|
||||
undefined,
|
||||
);
|
||||
const t = useTranslations('Login-register-form');
|
||||
|
||||
return (
|
||||
<form action={formAction}>
|
||||
<div className={`${styles['form-group']}`}>
|
||||
<label className={`${styles['form-label']}`}>
|
||||
{t('email-adress')}
|
||||
</label>
|
||||
<input
|
||||
type="readOnly"
|
||||
id="email"
|
||||
name="email"
|
||||
className={`${styles['form-input']}`}
|
||||
placeholder={t('enter-email')}
|
||||
/>
|
||||
{/* {state?.error?.email && (
|
||||
<p className={`${styles['form-error']}`}>
|
||||
{t(state?.error?.email)}
|
||||
</p>
|
||||
)} */}
|
||||
</div>
|
||||
{/* {state?.error.server && (
|
||||
<p className={`${styles['form-error']}`}>
|
||||
{t(state?.error.server)}
|
||||
</p>
|
||||
)} */}
|
||||
<div className={`${styles['form-options']}`}>
|
||||
<div className={`${styles['form-checkbox']}`}>
|
||||
<small>
|
||||
функционал не реализован
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" className={`${styles['btn']}`}>
|
||||
{t('sign-in')}
|
||||
</button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user