add translate

This commit is contained in:
smanylov
2025-12-12 11:00:23 +07:00
parent b63828befb
commit b5b66695df
10 changed files with 215 additions and 149 deletions
+5 -3
View File
@@ -1,3 +1,4 @@
import { useTranslations } from 'next-intl';
import { PieChart, Pie, Cell, ResponsiveContainer } from 'recharts'; import { PieChart, Pie, Cell, ResponsiveContainer } from 'recharts';
export const PieChartComponent = ({ data }: { export const PieChartComponent = ({ data }: {
@@ -7,7 +8,8 @@ export const PieChartComponent = ({ data }: {
color: string color: string
}[] }[]
}) => { }) => {
console.log(data) const t = useTranslations('Global');
return ( return (
<div <div
className="flex flex-col items-center" className="flex flex-col items-center"
@@ -18,7 +20,7 @@ export const PieChartComponent = ({ data }: {
0 0
</text> </text>
<text x={100} y={100} className="pie-char-text"> <text x={100} y={100} className="pie-char-text">
из {t('out-of')}
</text> </text>
<text x={100} y={120} className="pie-char-text"> <text x={100} y={120} className="pie-char-text">
0 0
@@ -42,7 +44,7 @@ export const PieChartComponent = ({ data }: {
{data.map((entry, index) => ( {data.map((entry, index) => (
<div key={`cell-${index}`} className="text-white"> <div key={`cell-${index}`} className="text-white">
<span className="w-2 h-2 rounded-full font-bold inline-block mr-1.5" style={{ backgroundColor: entry.color }}></span> <span className="w-2 h-2 rounded-full font-bold inline-block mr-1.5" style={{ backgroundColor: entry.color }}></span>
<span>{entry.name}</span> <span>{t(entry.name)}</span>
</div> </div>
))} ))}
</div> </div>
+9 -80
View File
@@ -130,7 +130,7 @@
.stats-wrapper { .stats-wrapper {
border-radius: 20px; border-radius: 20px;
overflow: hidden; overflow: hidden;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); background: white;
box-shadow: 0 4px 20px #00000014; box-shadow: 0 4px 20px #00000014;
margin-bottom: 30px; margin-bottom: 30px;
padding: 20px; padding: 20px;
@@ -138,14 +138,13 @@
h3 { h3 {
font-size: 20px; font-size: 20px;
margin-bottom: 10px; margin-bottom: 10px;
color: white;
} }
} }
.stats-grid { .stats-grid {
display: grid; display: grid;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(5, 1fr);
--boder-collor: #e4eaf028; --boder-collor: #f3f4f6;
.stats-item.images { .stats-item.images {
--card-color-1: #f08c00; --card-color-1: #f08c00;
@@ -162,32 +161,32 @@
.stats-item { .stats-item {
border: 1px solid var(--boder-collor); border: 1px solid var(--boder-collor);
border-right: none; border-right: none;
border-left: none;
border-bottom: none; border-bottom: none;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 40px; height: 40px;
background: #ffffff1a; background: #ffffff1a;
color: white;
&.stats-header { &.stats-header {
/* background: linear-gradient(180deg, #6366f1 0%, #8587f7 80%); */ background: #f9fafb;
color: white;
border-left: none; border-left: none;
font-size: 18px; font-size: 18px;
} }
&.first-column { &.first-column {
font-size: 18px; font-size: 18px;
border-left: 1px solid var(--boder-collor); justify-content: start;
padding-left: 20px;
.icon { .icon {
color: var(--card-color-1); color: var(--card-color-1);
margin-right: 10px;
} }
} }
&.last-column { &.last-column {
border-right: 1px solid var(--boder-collor);
} }
&.last-row { &.last-row {
@@ -197,6 +196,8 @@
&.left-top-corner { &.left-top-corner {
border-top-left-radius: 10px; border-top-left-radius: 10px;
border-left: 1px solid var(--boder-collor); border-left: 1px solid var(--boder-collor);
justify-content: start;
padding-left: 20px;
} }
&.right-top-corner { &.right-top-corner {
@@ -347,75 +348,3 @@
} }
} }
} }
.activity-chart {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 20px;
padding: 25px;
box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
border: none;
position: relative;
overflow: hidden;
h3 {
margin: 0 0 15px 0;
font-size: 18px;
color: white;
position: relative;
z-index: 1;
}
.activity-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 12px;
margin: 20px 0;
position: relative;
z-index: 1;
}
.activity-day {
text-align: center;
padding: 15px;
background: rgba(255, 255, 255, 0.15);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
backdrop-filter: blur(10px);
position: relative;
&:hover {
background: rgba(255, 255, 255, 0.25);
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
}
.activity-day-label {
font-size: 12px;
opacity: 0.8;
margin-bottom: 8px;
font-weight: 500;
}
.activity-day-value {
font-size: 20px;
font-weight: 700;
margin-bottom: 4px;
}
.activity-day-files {
font-size: 10px;
opacity: 0.7;
}
.activity-chart-footer {
text-align: center;
font-size: 12px;
opacity: 0.8;
position: relative;
z-index: 1;
margin-top: 15px;
}
}
+72
View File
@@ -1,5 +1,77 @@
/* removed */ /* removed */
/* .activity-chart {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: 20px;
padding: 25px;
box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
border: none;
position: relative;
overflow: hidden;
h3 {
margin: 0 0 15px 0;
font-size: 18px;
color: white;
position: relative;
z-index: 1;
}
.activity-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 12px;
margin: 20px 0;
position: relative;
z-index: 1;
}
.activity-day {
text-align: center;
padding: 15px;
background: rgba(255, 255, 255, 0.15);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
backdrop-filter: blur(10px);
position: relative;
&:hover {
background: rgba(255, 255, 255, 0.25);
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
}
.activity-day-label {
font-size: 12px;
opacity: 0.8;
margin-bottom: 8px;
font-weight: 500;
}
.activity-day-value {
font-size: 20px;
font-weight: 700;
margin-bottom: 4px;
}
.activity-day-files {
font-size: 10px;
opacity: 0.7;
}
.activity-chart-footer {
text-align: center;
font-size: 12px;
opacity: 0.8;
position: relative;
z-index: 1;
margin-top: 15px;
}
} */
export default function ActivityChart() { export default function ActivityChart() {
return ( return (
<div className="activity-chart"> <div className="activity-chart">
+13 -9
View File
@@ -2,35 +2,37 @@
import { useState } from 'react'; import { useState } from 'react';
import { PieChartComponent } from '@/app/components/PieChartComponent'; import { PieChartComponent } from '@/app/components/PieChartComponent';
import { useTranslations } from 'next-intl';
const data = [ const data = [
{ name: 'Изображения', value: 33, color: '#f08c00' }, { name: 'images', value: 33, color: '#f08c00' },
{ name: 'Видео', value: 50, color: '#2f9e44' }, { name: 'videos', value: 50, color: '#2f9e44' },
{ name: 'Аудио', value: 25, color: '#1971c2' }, { name: 'audios', value: 25, color: '#1971c2' },
]; ];
export default function ProtectionOverview() { export default function ProtectionOverview() {
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
const t = useTranslations('Global');
return ( return (
<div className="protection-overview"> <div className="protection-overview">
<h3>Защита вашего контента</h3> <h3>{t('protecting-your-content')}</h3>
<p>Текущий статус защищенности и активности системы мониторинга</p> <p>{t('current-status-of')}</p>
<div className={`protection-stats ${isOpen ? "opened" : ""}`}> <div className={`protection-stats ${isOpen ? "opened" : ""}`}>
<div className="protection-stat total-files"> <div className="protection-stat total-files">
<div className="protection-stat-value">0</div> <div className="protection-stat-value">0</div>
<div className="protection-stat-label">Всего файлов</div> <div className="protection-stat-label">{t('total-files')}</div>
</div> </div>
<div className="protection-stat total-checks"> <div className="protection-stat total-checks">
<div className="protection-stat-row"> <div className="protection-stat-row">
<div className="protection-stat-value">0</div> <div className="protection-stat-value">0</div>
<div className="protection-stat-label">проверок</div> <div className="protection-stat-label">{t('check')}</div>
</div> </div>
<div className="protection-stat-row"> <div className="protection-stat-row">
<div className="protection-stat-value">0</div> <div className="protection-stat-value">0</div>
<div className="protection-stat-label">нарушений</div> <div className="protection-stat-label">{t('violations')}</div>
</div> </div>
</div> </div>
{isOpen ? ( {isOpen ? (
@@ -40,7 +42,9 @@ export default function ProtectionOverview() {
) : ( ) : (
<div className="protection-stat total-usage"> <div className="protection-stat total-usage">
<div className="protection-stat-value">0 / 0</div> <div className="protection-stat-value">0 / 0</div>
<div className="protection-stat-label">Использовано места на диске</div> <div className="protection-stat-label">
{t('disk-space-used')}
</div>
</div> </div>
)} )}
</div> </div>
+7 -2
View File
@@ -2,8 +2,11 @@ import NotificationsButton from './notificationsButton';
import UserMenuButton from './userMenuButton'; import UserMenuButton from './userMenuButton';
import Link from 'next/link'; import Link from 'next/link';
import LanguageSwitcher from '@/app/components/LanguageSwitcher'; import LanguageSwitcher from '@/app/components/LanguageSwitcher';
import { useTranslations } from 'next-intl';
export default function HeaderPanel() { export default function HeaderPanel() {
const t = useTranslations("Global");
return ( return (
<header className="header"> <header className="header">
<div className="header-action"> <div className="header-action">
@@ -12,12 +15,14 @@ export default function HeaderPanel() {
href={'/pages/payment'} href={'/pages/payment'}
className="tokens-balance" className="tokens-balance"
> >
<div className="tokens-wrapper" title="Текущий баланс токенов для защиты файлов"> <div className="tokens-wrapper" title={t('current-balance-of-protection')}>
<svg viewBox="0 0 24 24" fill="currentColor" style={{ width: "16px", height: "16px" }}> <svg viewBox="0 0 24 24" fill="currentColor" style={{ width: "16px", height: "16px" }}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"></path> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"></path>
</svg> </svg>
<span className="tokens-count">800</span> <span className="tokens-count">800</span>
<span className="tokens-label">токенов</span> <span className="tokens-label">
{t('tokens')}
</span>
</div> </div>
</Link> </Link>
<NotificationsButton /> <NotificationsButton />
+7 -5
View File
@@ -6,10 +6,12 @@ import Link from 'next/link';
import { getUserData } from '@/app/actions/action'; import { getUserData } from '@/app/actions/action';
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { logout } from '@/app/actions/auth'; import { logout } from '@/app/actions/auth';
import { useTranslations } from 'next-intl';
export default function UserMenuButton() { export default function UserMenuButton() {
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
const menuRef = useRef<HTMLDivElement | null>(null); const menuRef = useRef<HTMLDivElement | null>(null);
const t = useTranslations("Global");
const { const {
data: userData, data: userData,
isLoading, isLoading,
@@ -61,12 +63,12 @@ export default function UserMenuButton() {
{userData?.email ? userData.email : ''} {userData?.email ? userData.email : ''}
</div> </div>
<div className="user-subscription"> <div className="user-subscription">
<span className="text-[14px]">Тариф: </span> <span className="text-[14px]">{t('rate')}: </span>
<span className="subscription-badge"> <span className="subscription-badge">
{userData?.subscriptionType ? userData.subscriptionType : ''} {userData?.subscriptionType ? userData.subscriptionType : ''}
</span> </span>
<br /> <br />
<span className="user-subscription-expire">Истекает: 00.00.00</span> <span className="user-subscription-expire">{t('expires')}: 00.00.00</span>
</div> </div>
</div> </div>
</div> </div>
@@ -76,13 +78,13 @@ export default function UserMenuButton() {
<svg viewBox="0 0 24 24" fill="currentColor"> <svg viewBox="0 0 24 24" fill="currentColor">
<path d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.82,11.69,4.82,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"></path> <path d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.82,11.69,4.82,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"></path>
</svg> </svg>
Настройки {t('settings')}
</Link> </Link>
<Link href="/pages/faq" className="user-menu-item"> <Link href="/pages/faq" className="user-menu-item">
<svg viewBox="0 0 24 24" fill="currentColor"> <svg viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"></path> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"></path>
</svg> </svg>
Помощь {t('help')}
</Link> </Link>
</div> </div>
@@ -98,7 +100,7 @@ export default function UserMenuButton() {
<svg viewBox="0 0 24 24" fill="currentColor"> <svg viewBox="0 0 24 24" fill="currentColor">
<path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"></path> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"></path>
</svg> </svg>
Выйти {t('exit')}
</Link> </Link>
</div> </div>
</div> </div>
+8 -4
View File
@@ -3,10 +3,12 @@ import { useState, useRef } from 'react';
import Link from 'next/link'; import Link from 'next/link';
import clsx from 'clsx'; import clsx from 'clsx';
import { usePathname } from 'next/navigation'; import { usePathname } from 'next/navigation';
import { useTranslations } from 'next-intl';
export default function DropDownList() { export default function DropDownList() {
const pathname = usePathname(); const pathname = usePathname();
const [dropDownExpanded, setDropDownExpanded] = useState(false); const [dropDownExpanded, setDropDownExpanded] = useState(false);
const t = useTranslations('Global');
function dropDownHandler() { function dropDownHandler() {
setDropDownExpanded(!dropDownExpanded); setDropDownExpanded(!dropDownExpanded);
@@ -14,15 +16,15 @@ export default function DropDownList() {
const links = [ const links = [
{ {
name: 'Маркировка фото', name: t('photo-marking'),
href: '/pages/marking-photo' href: '/pages/marking-photo'
}, },
{ {
name: 'Маркировка видео', name: t('video-marking'),
href: '/pages/marking-video' href: '/pages/marking-video'
}, },
{ {
name: 'Маркировка аудио', name: t('audio-marking'),
href: '/pages/marking-audio' href: '/pages/marking-audio'
} }
]; ];
@@ -40,7 +42,9 @@ export default function DropDownList() {
<svg viewBox="0 0 24 24" fill="currentColor"> <svg viewBox="0 0 24 24" fill="currentColor">
<path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2l-5.37.84z"></path> <path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2l-5.37.84z"></path>
</svg> </svg>
<p>Маркировка</p> <p>
{t('marking')}
</p>
<svg className={`${styles['dropdown-arrow']}`} viewBox="0 0 24 24" fill="currentColor"> <svg className={`${styles['dropdown-arrow']}`} viewBox="0 0 24 24" fill="currentColor">
<path d="M7 10l5 5 5-5z"></path> <path d="M7 10l5 5 5-5z"></path>
</svg> </svg>
+15 -13
View File
@@ -7,35 +7,40 @@ import styles from '@/app/styles/ui.module.scss'
import Logo from '@/app/ui/logo'; import Logo from '@/app/ui/logo';
import DropDownList from '@/app/ui/nav-link-dropdown'; import DropDownList from '@/app/ui/nav-link-dropdown';
import { logout } from '@/app/actions/auth'; import { logout } from '@/app/actions/auth';
import { useTranslations } from 'next-intl';
export default function NavLinks() {
const pathname = usePathname();
const t = useTranslations('Global');
const links = [ const links = [
{ {
name: 'Отчёты', name: t('reports'),
href: '/pages/reports', href: '/pages/reports',
img: 'M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z' img: 'M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z'
}, },
{ {
name: 'Настройка', name: t('settings'),
href: '/pages/settings', href: '/pages/settings',
img: 'M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.82,11.69,4.82,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z' img: 'M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.82,11.69,4.82,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z'
}, },
{ {
name: 'Мой контент', name: t('my-content'),
href: '/pages/emptypage', href: '/pages/emptypage',
img: 'M20 6h-2.18c.11-.31.18-.65.18-1a2.996 2.996 0 0 0-5.5-1.65l-.5.67-.5-.68C10.96 2.54 10 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z' img: 'M20 6h-2.18c.11-.31.18-.65.18-1a2.996 2.996 0 0 0-5.5-1.65l-.5.67-.5-.68C10.96 2.54 10 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z'
}, },
{ {
name: 'Реферальная программа', name: t('referral-program'),
href: '/pages/emptypage', href: '/pages/emptypage',
img: 'M16 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm4 18v-6h2.5l-2.54-7.63A1.5 1.5 0 0 0 18.54 8H16c-.8 0-1.54.37-2 1l-3 4v2h2l2.54-3.82L16.5 18H20z' img: 'M16 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm4 18v-6h2.5l-2.54-7.63A1.5 1.5 0 0 0 18.54 8H16c-.8 0-1.54.37-2 1l-3 4v2h2l2.54-3.82L16.5 18H20z'
}, },
{ {
name: 'Нарушения', name: t('violations'),
href: '/pages/emptypage', href: '/pages/emptypage',
img: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' img: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'
}, },
{ {
name: 'Поиск', name: t('search'),
href: '/pages/emptypage', href: '/pages/emptypage',
img: 'M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z' img: 'M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'
}, },
@@ -46,16 +51,13 @@ const links = [
} }
]; ];
export default function NavLinks() {
const pathname = usePathname();
return ( return (
<div className=''> <div className=''>
<nav className={`${styles.sidebar}`}> <nav className={`${styles.sidebar}`}>
<Logo /> <Logo />
<ul> <ul>
<Link <Link
key='Главная' key={t('home')}
href='/pages/dashboard' href='/pages/dashboard'
className={clsx( className={clsx(
`flex ${styles['nav-link']}`, `flex ${styles['nav-link']}`,
@@ -67,7 +69,7 @@ export default function NavLinks() {
<svg viewBox="0 0 24 24" fill="currentColor"> <svg viewBox="0 0 24 24" fill="currentColor">
<path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path>
</svg> </svg>
<p className="hidden md:block">Главная</p> <p className="hidden md:block">{t('home')}</p>
</Link> </Link>
<DropDownList /> <DropDownList />
@@ -92,7 +94,7 @@ export default function NavLinks() {
); );
})} })}
<Link <Link
key='Выход' key={t('exit')}
href='/login' href='/login'
className={`flex ${styles['nav-link']}`} className={`flex ${styles['nav-link']}`}
onClick={(e) => { onClick={(e) => {
@@ -103,7 +105,7 @@ export default function NavLinks() {
<svg viewBox="0 0 24 24" fill="currentColor"> <svg viewBox="0 0 24 24" fill="currentColor">
<path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"></path> <path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"></path>
</svg> </svg>
<p className="hidden md:block">Выход</p> <p className="hidden md:block">{t('exit')}</p>
</Link> </Link>
</ul> </ul>
</nav> </nav>
+24 -1
View File
@@ -12,9 +12,32 @@
"size": "Size", "size": "Size",
"violations": "Violations", "violations": "Violations",
"checks": "Checks", "checks": "Checks",
"check": "Checks",
"videos": "Videos", "videos": "Videos",
"audios": "Audio", "audios": "Audio",
"images": "Images" "images": "Images",
"main": "Main",
"marking": "Marking",
"reports": "Reports",
"settings": "Settings",
"my-content": "My content",
"referral-program": "Referral program",
"search": "Search",
"exit": "Exit",
"photo-marking": "Photo marking",
"video-marking": "Video marking",
"audio-marking": "Audio marking",
"tokens": "tokens",
"current-balance-of-protection": "Current file protection token balance",
"rate": "Rate",
"expires": "Expires",
"help": "Help",
"home": "Home",
"protecting-your-content": "Protecting your content",
"current-status-of": "Current status of security and activity of the monitoring system",
"total-files": "Total files",
"disk-space-used": "Disk space used",
"out-of": "out of"
}, },
"Login-register-form": { "Login-register-form": {
"already-have-an-account": "Already have an account", "already-have-an-account": "Already have an account",
+24 -1
View File
@@ -12,9 +12,32 @@
"size": "Размер", "size": "Размер",
"violations": "Нарушения", "violations": "Нарушения",
"checks": "Проверки", "checks": "Проверки",
"check": "Проверок",
"videos": "Видео", "videos": "Видео",
"audios": "Аудио", "audios": "Аудио",
"images": "Изображения" "images": "Изображения",
"main": "Главная",
"marking": "Маркировка",
"reports": "Отчёты",
"settings": "Настройки",
"my-content": "Мой контент",
"referral-program": "Реферальная программа",
"search": "Поиск",
"exit": "Выход",
"photo-marking": "Маркировка фото",
"video-marking": "Маркировка видео",
"audio-marking": "Маркировка аудио",
"tokens": "токенов",
"current-balance-of-protection": "Текущий баланс токенов для защиты файлов",
"rate": "Тариф",
"expires": "Истекает",
"help": "Помощь",
"home": "Главная",
"protecting-your-content": "Защита вашего контента",
"current-status-of": "Текущий статус защищенности и активности системы мониторинга",
"total-files": "Всего файлов",
"disk-space-used": "Использовано места на диске",
"out-of": "из"
}, },
"Login-register-form": { "Login-register-form": {
"already-have-an-account": "Уже есть аккаунт", "already-have-an-account": "Уже есть аккаунт",