fix translates and visual bugs
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "no-copy-frontend",
|
"name": "no-copy-frontend",
|
||||||
"version": "0.4.0",
|
"version": "0.5.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 2999",
|
"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> = {};
|
const errors: Record<string, string> = {};
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case '1':
|
case '1':
|
||||||
errors['server'] = 'email-already-registered'
|
errors['server'] = 'email-or-already-registered'
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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 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 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>
|
<div className="text-sm font-medium mb-1">{t('date-filter')}:</div>
|
||||||
<DropDownList
|
<DropDownList
|
||||||
value={(() => {
|
value={(() => {
|
||||||
@@ -377,7 +377,7 @@ export default function TanstakFilesTable() {
|
|||||||
</DropDownList>
|
</DropDownList>
|
||||||
</div>
|
</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>
|
<div className="text-sm font-medium mb-1">{t('type-filter')}:</div>
|
||||||
<DropDownList
|
<DropDownList
|
||||||
value={(() => {
|
value={(() => {
|
||||||
@@ -474,7 +474,7 @@ export default function TanstakFilesTable() {
|
|||||||
</div>
|
</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">
|
<div className="flex items-center gap-2">
|
||||||
<span className="text-sm text-gray-700">
|
<span className="text-sm text-gray-700">
|
||||||
{t('page')}{' '}
|
{t('page')}{' '}
|
||||||
|
|||||||
@@ -22,4 +22,11 @@ h4 {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
svg:focus,
|
||||||
|
g:focus,
|
||||||
|
path:focus {
|
||||||
|
outline: none;
|
||||||
|
outline-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
@import "tailwindcss";
|
@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",
|
"today": "Today",
|
||||||
"for-a-week": "For a week",
|
"for-a-week": "For a week",
|
||||||
"for-a-month": "For a month",
|
"for-a-month": "For a month",
|
||||||
"older-than-a-month": "Older than a month",
|
"older-than-a-month": "Over a month old",
|
||||||
"show": "Show",
|
"show": "Show",
|
||||||
"no-data-for-selected-filters": "No data for selected filters",
|
"no-data-for-selected-filters": "No data for selected filters",
|
||||||
"page": "Page",
|
"page": "Page",
|
||||||
@@ -159,9 +159,10 @@
|
|||||||
"safe-storage": "Reliable storage and data security",
|
"safe-storage": "Reliable storage and data security",
|
||||||
"sign-in": "Sign in",
|
"sign-in": "Sign in",
|
||||||
"terms-of-use": "terms of use",
|
"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",
|
"password-does-not-match": "Password does not match",
|
||||||
"email-not-found": "Email not found",
|
"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": "Все типы",
|
"all-types": "Все типы",
|
||||||
"statistics": "Статистика",
|
"statistics": "Статистика",
|
||||||
"your-content": "Ваш контент",
|
"your-content": "Ваш контент",
|
||||||
"file": "Фаил",
|
"file": "Файл",
|
||||||
"files": "Фаил",
|
"files": "Файлов",
|
||||||
"content-type": "Тип контента",
|
"content-type": "Тип контента",
|
||||||
"quantity": "Количество",
|
"quantity": "Количество",
|
||||||
"size": "Размер",
|
"size": "Размер",
|
||||||
@@ -159,9 +159,10 @@
|
|||||||
"safe-storage": "Надежное хранение и безопасность данных",
|
"safe-storage": "Надежное хранение и безопасность данных",
|
||||||
"sign-in": "Войти в систему",
|
"sign-in": "Войти в систему",
|
||||||
"terms-of-use": "условиями использования",
|
"terms-of-use": "условиями использования",
|
||||||
"email-already-registered": "Такой Email уже зарегистрирован",
|
"email-or-already-registered": "Такой email и/или телефон уже зарегистрированы",
|
||||||
"password-does-not-match": "Пароль не совпадает",
|
"password-does-not-match": "Неверный пароль",
|
||||||
"email-not-found": "Email не найден",
|
"email-not-found": "Email не найден",
|
||||||
"register-error-no-digits": "В имени не должно быть цифр."
|
"register-error-no-digits": "В имени не должно быть цифр.",
|
||||||
|
"recover-password": "Восстановить пароль"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user