fix translates and visual bugs
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "no-copy-frontend",
|
||||
"version": "0.4.0",
|
||||
"version": "0.5.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 2999",
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
"today": "Today",
|
||||
"for-a-week": "For a week",
|
||||
"for-a-month": "For a month",
|
||||
"older-than-a-month": "Older than a month",
|
||||
"older-than-a-month": "Over a month old",
|
||||
"show": "Show",
|
||||
"no-data-for-selected-filters": "No data for selected filters",
|
||||
"page": "Page",
|
||||
@@ -159,9 +159,10 @@
|
||||
"safe-storage": "Reliable storage and data security",
|
||||
"sign-in": "Sign in",
|
||||
"terms-of-use": "terms of use",
|
||||
"email-already-registered": "Email already registered",
|
||||
"email-or-already-registered": "Email or phone already registered",
|
||||
"password-does-not-match": "Password does not match",
|
||||
"email-not-found": "Email not found",
|
||||
"register-error-no-digits": "The name should not contain a number."
|
||||
"register-error-no-digits": "The name should not contain a number.",
|
||||
"recover-password": "Recover password"
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,8 @@
|
||||
"all-types": "Все типы",
|
||||
"statistics": "Статистика",
|
||||
"your-content": "Ваш контент",
|
||||
"file": "Фаил",
|
||||
"files": "Фаил",
|
||||
"file": "Файл",
|
||||
"files": "Файлов",
|
||||
"content-type": "Тип контента",
|
||||
"quantity": "Количество",
|
||||
"size": "Размер",
|
||||
@@ -159,9 +159,10 @@
|
||||
"safe-storage": "Надежное хранение и безопасность данных",
|
||||
"sign-in": "Войти в систему",
|
||||
"terms-of-use": "условиями использования",
|
||||
"email-already-registered": "Такой Email уже зарегистрирован",
|
||||
"password-does-not-match": "Пароль не совпадает",
|
||||
"email-or-already-registered": "Такой email и/или телефон уже зарегистрированы",
|
||||
"password-does-not-match": "Неверный пароль",
|
||||
"email-not-found": "Email не найден",
|
||||
"register-error-no-digits": "В имени не должно быть цифр."
|
||||
"register-error-no-digits": "В имени не должно быть цифр.",
|
||||
"recover-password": "Восстановить пароль"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user