make translate for login, register pages
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import Providers from '@/app/providers/getQueryServer'
|
||||
import type { Metadata } from "next";
|
||||
import { NextIntlClientProvider, hasLocale } from 'next-intl';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { routing } from '@/i18n/routing';
|
||||
import "../styles/globals.css";
|
||||
import "../styles/global-styles.scss";
|
||||
|
||||
export function generateStaticParams() {
|
||||
return routing.locales.map((locale: any) => ({ locale }));
|
||||
}
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "No copy",
|
||||
description: "No copy",
|
||||
};
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
params: Promise<{ locale: string }>;
|
||||
}>) {
|
||||
const { locale } = await params;
|
||||
if (!hasLocale(routing.locales, locale)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<html lang={locale}>
|
||||
<body>
|
||||
<NextIntlClientProvider>
|
||||
<Providers>
|
||||
{children}
|
||||
</Providers>
|
||||
</NextIntlClientProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import { Metadata } from 'next';
|
||||
import styles from '@/app/styles/login.module.scss'
|
||||
import LogoIcon from '@/app/ui/logo-icon';
|
||||
import Link from 'next/link';
|
||||
import LoginForm from '@/app/ui/login-form';
|
||||
import LanguageSwitcher from '@/app/components/LanguageSwitcher';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Login',
|
||||
};
|
||||
|
||||
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('copyright-protection')}
|
||||
</p>
|
||||
</div>
|
||||
<LoginForm />
|
||||
<div className="divider">
|
||||
<span>
|
||||
{t('or-log-in-via')}
|
||||
</span>
|
||||
</div>
|
||||
<div className={`${styles['register-link']}`}>
|
||||
<p>{t('no-account')}?
|
||||
<Link href="register"> {t('register')}</Link>
|
||||
</p>
|
||||
</div>
|
||||
<div className={`${styles['features']}`}>
|
||||
<div className={`${styles['feature']}`}>
|
||||
<svg className={`${styles['feature-icon']}`} viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
{t('protecting-watermark')}
|
||||
</div>
|
||||
<div className={`${styles['feature']}`}>
|
||||
<svg className={`${styles['feature-icon']}`} viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
||||
</svg>
|
||||
{t('monitoring-violations')}
|
||||
</div>
|
||||
<div className={`${styles['feature']}`}>
|
||||
<svg className={`${styles['feature-icon']}`} viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 1L3 5v6c0 5.55 3.84 9.74 9 11 5.16-1.26 9-5.45 9-11V5l-9-4z"></path>
|
||||
</svg>
|
||||
{t('safe-storage')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import styles from "@/app/styles/page.module.scss";
|
||||
import { Metadata } from 'next';
|
||||
import Link from 'next/link';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Home page',
|
||||
};
|
||||
|
||||
export default function Home() {
|
||||
const t = useTranslations('HomePage');
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<main className={styles.main}>
|
||||
<div className={styles.intro}>
|
||||
Home page
|
||||
{t('title')}
|
||||
</div>
|
||||
<Link key={'dashboard'}
|
||||
href={'/pages/dashboard'}
|
||||
>dash board</Link>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Metadata } from 'next';
|
||||
import { Suspense } from 'react';
|
||||
import ProtectionOverview from '@/app/ui/dashboard/protection-overview';
|
||||
import StatsGrid from '@/app/ui/dashboard/stats-grid';
|
||||
import StorageBreakdown from '@/app/ui/dashboard/storage-breakdown';
|
||||
import ChartContainer from '@/app/ui/dashboard/chart-container';
|
||||
import ViolationsTable from '@/app/ui/dashboard/violations-table';
|
||||
import ViolationsTypeTable from '@/app/ui/dashboard/violations-type-table';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Dashboard',
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations('Global');
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Suspense fallback={<>...</>}>
|
||||
<h1 className="page-title">
|
||||
{t("statistics")}
|
||||
</h1>
|
||||
<ProtectionOverview />
|
||||
<StatsGrid />
|
||||
<StorageBreakdown />
|
||||
<ChartContainer />
|
||||
<ViolationsTable />
|
||||
<ViolationsTypeTable />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Metadata } from 'next';
|
||||
import Test from '@/app/ui/test';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'emptypage',
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<main>
|
||||
<div>
|
||||
emptypage
|
||||
</div>
|
||||
<div>
|
||||
<Test />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import NavLinks from '@/app/ui/nav-links'
|
||||
import styles from '@/app/styles/page.module.scss'
|
||||
import HeaderPanel from '@/app/ui/header/headerPanel';
|
||||
import { getQueryClient } from '@/app/providers/getQueryClient';
|
||||
import { HydrationBoundary, dehydrate } from '@tanstack/react-query';
|
||||
import { getUserData } from '@/app/actions/action';
|
||||
|
||||
export default async function Layout({ children }: { children: React.ReactNode }) {
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
await Promise.all([
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ['userData'],
|
||||
queryFn: () => getUserData()
|
||||
})
|
||||
])
|
||||
|
||||
return (
|
||||
<div className="flex">
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
<NavLinks />
|
||||
<div className={`${styles['main-containter']}`}>
|
||||
<HeaderPanel />
|
||||
<main>
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
</HydrationBoundary>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table';
|
||||
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
|
||||
import TestSection from '@/app/ui/marking-page/test-section';
|
||||
import { IconAudioFile } from '@/app/ui/icons/icons';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<div className="page-title">
|
||||
<h1 >Защита аудио</h1>
|
||||
</div>
|
||||
<ProtectionSummary />
|
||||
<TestSection />
|
||||
<ProtectedFilesTable />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table';
|
||||
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
|
||||
import TestSection from '@/app/ui/marking-page/test-section';
|
||||
import UploadSectionImage from '@/app/ui/marking-page/upload-section-image';
|
||||
import { IconImageFile } from '@/app/ui/icons/icons';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<div className="page-title">
|
||||
<h1 >Защита изображений</h1>
|
||||
</div>
|
||||
<ProtectionSummary />
|
||||
<UploadSectionImage />
|
||||
<TestSection />
|
||||
<ProtectedFilesTable />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table';
|
||||
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
|
||||
import TestSection from '@/app/ui/marking-page/test-section';
|
||||
import UploadSectionVideo from '@/app/ui/marking-page/upload-section-video';
|
||||
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<div className="page-title">
|
||||
<h1 >Защита видео</h1>
|
||||
</div>
|
||||
<ProtectionSummary />
|
||||
<UploadSectionVideo />
|
||||
<TestSection />
|
||||
<ProtectedFilesTable />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Metadata } from 'next';
|
||||
import UserUsage from '@/app/ui/payment/user-usage';
|
||||
import TokensSpendStats from '@/app/ui/payment/tokens-spend-stats';
|
||||
import PaymentTabs from '@/app/ui/payment/payment-tabs';
|
||||
import SecurePayments from '@/app/ui/payment/secure-payments';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'payment',
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<main>
|
||||
<div className="payment-container">
|
||||
<div>
|
||||
<h1 className="page-title">💳 Управление подпиской и токенами</h1>
|
||||
<p>
|
||||
Выберите подходящий тарифный план или пополните баланс токенов для защиты файлов
|
||||
</p>
|
||||
</div>
|
||||
<UserUsage />
|
||||
<TokensSpendStats />
|
||||
<PaymentTabs />
|
||||
<SecurePayments />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import StatsGrid from '@/app/ui/dashboard/stats-grid';
|
||||
import ViolationsTable from '@/app/ui/dashboard/violations-table';
|
||||
import FinalSummary from '@/app/ui/reports/final-summary';
|
||||
import AnalyticsCardMonth from '@/app/ui/reports/analytics-card-month';
|
||||
import AnalyticsCardGeography from '@/app/ui/reports/analytics-carв-geography';
|
||||
import ActivityByContentType from '@/app/ui/reports/activity-by-content-type';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="page-title">Отчёты и аналитика</h1>
|
||||
<StatsGrid />
|
||||
<ActivityByContentType />
|
||||
<div className="analytics-grid">
|
||||
<AnalyticsCardMonth />
|
||||
<AnalyticsCardGeography />
|
||||
</div>
|
||||
<ViolationsTable />
|
||||
<FinalSummary />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import PersonalDataSettings from '@/app/ui/settings/personal-data-settings'
|
||||
import NotificationsMonitoringSettings from '@/app/ui/settings/notifications-monitoring-settings';
|
||||
import SafetySetting from '@/app/ui/settings/safety-settings';
|
||||
import SubscriptionSettings from '@/app/ui/settings/subscription-settings';
|
||||
import APISettings from '@/app/ui/settings/api-settings';
|
||||
import LastActivitySettings from '@/app/ui/settings/last-activity-settings';
|
||||
import DangerZone from '@/app/ui/settings/danger-zone';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<h1 className="page-title">⚙️ Настройки аккаунта</h1>
|
||||
<div className="settings-grid">
|
||||
<PersonalDataSettings />
|
||||
<NotificationsMonitoringSettings/>
|
||||
<SafetySetting/>
|
||||
<SubscriptionSettings/>
|
||||
<APISettings/>
|
||||
<LastActivitySettings/>
|
||||
</div>
|
||||
<DangerZone/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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/register-form';
|
||||
import LanguageSwitcher from '@/app/components/LanguageSwitcher';
|
||||
import {useTranslations} from 'next-intl';
|
||||
|
||||
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('create-an-account')}
|
||||
</p>
|
||||
</div>
|
||||
<div className={`${styles['subscription-info']}`}>
|
||||
<h4>🎉 {t('free-start')}</h4>
|
||||
<p>
|
||||
{t('free-start-description')}
|
||||
</p>
|
||||
</div>
|
||||
<RegisterForm />
|
||||
<div className="divider">
|
||||
<span>
|
||||
{t('or-register-via')}
|
||||
</span>
|
||||
</div>
|
||||
<div className={`${styles['register-link']}`}>
|
||||
<p>{t('already-have-an-account')}? <Link href="login">{t('login')}</Link></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
terms-and-privacy-policy
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user