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
+72
View File
@@ -1,5 +1,77 @@
/* 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() {
return (
<div className="activity-chart">
+14 -10
View File
@@ -2,45 +2,49 @@
import { useState } from 'react';
import { PieChartComponent } from '@/app/components/PieChartComponent';
import { useTranslations } from 'next-intl';
const data = [
{ name: 'Изображения', value: 33, color: '#f08c00' },
{ name: 'Видео', value: 50, color: '#2f9e44' },
{ name: 'Аудио', value: 25, color: '#1971c2' },
{ name: 'images', value: 33, color: '#f08c00' },
{ name: 'videos', value: 50, color: '#2f9e44' },
{ name: 'audios', value: 25, color: '#1971c2' },
];
export default function ProtectionOverview() {
const [isOpen, setIsOpen] = useState(false);
const t = useTranslations('Global');
return (
<div className="protection-overview">
<h3>Защита вашего контента</h3>
<p>Текущий статус защищенности и активности системы мониторинга</p>
<h3>{t('protecting-your-content')}</h3>
<p>{t('current-status-of')}</p>
<div className={`protection-stats ${isOpen ? "opened" : ""}`}>
<div className="protection-stat total-files">
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">Всего файлов</div>
<div className="protection-stat-label">{t('total-files')}</div>
</div>
<div className="protection-stat total-checks">
<div className="protection-stat-row">
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">проверок</div>
<div className="protection-stat-label">{t('check')}</div>
</div>
<div className="protection-stat-row">
<div className="protection-stat-value">0</div>
<div className="protection-stat-label">нарушений</div>
<div className="protection-stat-label">{t('violations')}</div>
</div>
</div>
{isOpen ? (
<div className="protection-stat total-usage">
<PieChartComponent data={data}/>
<PieChartComponent data={data} />
</div>
) : (
<div className="protection-stat total-usage">
<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>