diff --git a/package.json b/package.json index ac86834..20d15f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "no-copy-frontend", - "version": "0.63.0", + "version": "0.64.0", "private": true, "scripts": { "dev": "next dev -p 2999", diff --git a/src/app/[locale]/pages/reports/page.tsx b/src/app/[locale]/pages/reports/page.tsx index edf6d9c..dc124b8 100644 --- a/src/app/[locale]/pages/reports/page.tsx +++ b/src/app/[locale]/pages/reports/page.tsx @@ -1,5 +1,4 @@ -import StatsGrid from '@/app/ui/dashboard/stats-grid'; -import ViolationsTable from '@/app/ui/dashboard/violations-table'; +import ViolationsTable from '@/app/ui/violations/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'; @@ -11,7 +10,6 @@ export default function Page() { return (
- {/* */}
diff --git a/src/app/styles/reports.scss b/src/app/styles/reports.scss index df278d1..08c52d3 100644 --- a/src/app/styles/reports.scss +++ b/src/app/styles/reports.scss @@ -14,12 +14,7 @@ color: white; display: flex; align-items: center; - - &::before { - content: '🔍'; - margin-right: 12px; - font-size: 28px; - } + margin-bottom: 20px; } .search-stats-grid { @@ -49,7 +44,13 @@ .search-stat-icon { font-size: 32px; margin-bottom: 15px; - display: block; + display: flex; + justify-content: center; + + .icon { + width: 50px; + height: 50px; + } } .search-stat-value { @@ -190,6 +191,7 @@ .summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + grid-template-columns: 1fr 2fr 1fr; gap: 30px; position: relative; z-index: 2; @@ -204,6 +206,11 @@ border: 2px solid rgba(255, 255, 255, 0.2); transition: all 0.4s ease; + &.center { + display: flex; + justify-content: space-around; + } + &:hover { transform: translateY(-8px) scale(1.02); background: rgba(255, 255, 255, 0.2); diff --git a/src/app/ui/icons/icons.tsx b/src/app/ui/icons/icons.tsx index b8a8d65..fd8dca0 100644 --- a/src/app/ui/icons/icons.tsx +++ b/src/app/ui/icons/icons.tsx @@ -2,7 +2,9 @@ export function IconImageFile() { return ( - + + + ) } diff --git a/src/app/ui/reports/activity-by-content-type.tsx b/src/app/ui/reports/activity-by-content-type.tsx index c0518f1..f7dbb3f 100644 --- a/src/app/ui/reports/activity-by-content-type.tsx +++ b/src/app/ui/reports/activity-by-content-type.tsx @@ -1,31 +1,56 @@ +'use client' + +import { useUserFilesInfo } from '@/app/hooks/react-query/useUserFilesInfo'; +import { useTranslations } from 'next-intl'; +import { IconImageFile, IconVideoFile, IconAudioFile, IconDocument } from '@/app/ui/icons/icons'; + export default function ActivityByContentType() { + const t = useTranslations('Global'); + const { data: filesInfo, isLoading, isError, error } = useUserFilesInfo(); + return (

- Активность проверок по типам контента + {t('check-activity-by-content-type')}

-
📸
-
0
-
Изображения
+
+ +
+
{filesInfo?.images.check ? filesInfo?.images.check : 0}
+
+ {t('images')} +
-
🎬
-
0
-
Видеофайлы
+
+ +
+
{filesInfo?.videos.check ? filesInfo?.videos.check : 0}
+
+ {t('videos')} +
-
🎵
-
0
-
Аудиозаписи
+
+ +
+
{filesInfo?.audios.check ? filesInfo?.audios.check : 0}
+
+ {t('audios')} +
-
📄
-
0
-
Документы
+
+ +
+
{filesInfo?.documents.check ? filesInfo?.documents.check : 0}
+
+ {t('documents')} +
diff --git a/src/app/ui/reports/analytics-card-month.tsx b/src/app/ui/reports/analytics-card-month.tsx index 3762954..bef7457 100644 --- a/src/app/ui/reports/analytics-card-month.tsx +++ b/src/app/ui/reports/analytics-card-month.tsx @@ -1,55 +1,64 @@ +'use client' + + +import { useTranslations } from 'next-intl'; + export default function AnalyticsCardMonth() { + const t = useTranslations('Global'); + return (
-
📊
-

Активность по месяцам

+
+

+ {t('activity-by-month')} +

- 📅 Июль + {t('july')}
- 0 файлов + 0 {t('files')} 0 Б
- 📅 Август + {t('august')}
- 0 файлов + 0 {t('files')} 0 Б
- 📅 Сентябрь + {t('september')}
- 0 файлов + 0 {t('files')} 0 Б
- 📅 Октябрь + {t('october')}
- 3 файлов + 0 {t('files')} - 2.42 МБ + 0 Б
- 📅 Ноябрь + {t('november')}
- 14 файлов + 0 {t('files')} - 43.53 МБ + 0 Б
- 📅 Декабрь + {t('december')}
- 0 файлов + 0 {t('files')} 0 Б
diff --git a/src/app/ui/reports/analytics-carв-geography.tsx b/src/app/ui/reports/analytics-carв-geography.tsx index 39a275e..01e63b8 100644 --- a/src/app/ui/reports/analytics-carв-geography.tsx +++ b/src/app/ui/reports/analytics-carв-geography.tsx @@ -1,33 +1,53 @@ +'use client' + +import { useTranslations } from 'next-intl' + export default function AnalyticsCardGeography() { + const t = useTranslations('Global'); + return (
-
🌍
-

География нарушений

+
+

+ {t('geography-of-violations')} +

- 🇷🇺 Россия + + {t('russia')} + 0
- 🇺🇸 США + + {t('usa')} + 0
- 🇩🇪 Германия + + {t('germany')} + 0
- 🇫🇷 Франция + + {t('france')} + 0
- 🇬🇧 Великобритания + + {t('uk')} + 0
- 🇨🇳 Китай + + {t('china')} + 0
diff --git a/src/app/ui/reports/final-summary.tsx b/src/app/ui/reports/final-summary.tsx index 235b480..740d8e0 100644 --- a/src/app/ui/reports/final-summary.tsx +++ b/src/app/ui/reports/final-summary.tsx @@ -1,32 +1,56 @@ +'use client' + +import { useUserFilesInfo } from '@/app/hooks/react-query/useUserFilesInfo'; +import { useTranslations } from 'next-intl'; +import { useEffect } from 'react'; + export default function FinalSummary() { + const t = useTranslations('Global'); + const { data: filesInfo, isLoading, isError, error } = useUserFilesInfo(); + return (

- 📈 Итоговая статистика за Декабрь 2025 + {t('summary-statistics')} {/* за Декабрь 2025 */}

- Общие показатели эффективности системы защиты + {t('general-indicators-of-the-protection-system')}

-
🔍
-
0
-
Всего проверок
-
+15% к прошлому месяцу
+ {/*
🔍
*/} +
{filesInfo?.total.check ? filesInfo?.total.check : 0}
+
+ {t('total-number-of-checks')} +
+ {/*
+15% к прошлому месяцу
*/} +
+
+ {/*
🚨
*/} +
+
{filesInfo?.total.violation ? filesInfo?.total.violation : 0}
+
+ {t('violations-found')} +
+
+
+
0
+
+ {t('violations-registered')} +
+
+ + {/*
Отличный результат!
*/}
-
🚨
-
0
-
Нарушений найдено
-
Отличный результат!
-
-
-
🛡️
-
0
-
Защищенного контента
-
+0 за период
+ {/*
🛡️
*/} +
{filesInfo?.total.quantity ? filesInfo?.total.quantity : 0}
+
+ {t('protected-content')} +
+ {/*
+0 за период
*/}
diff --git a/src/app/ui/reports/reports-info.tsx b/src/app/ui/reports/reports-info.tsx index cecb004..e628159 100644 --- a/src/app/ui/reports/reports-info.tsx +++ b/src/app/ui/reports/reports-info.tsx @@ -6,8 +6,6 @@ import {IconDocument, IconSearch, IconWarning, IconGraph} from '@/app/ui/icons/i export default function ReportsInfo() { const t = useTranslations("Global"); - - const { data: filesInfo, isLoading, isError, error } = useUserFilesInfo(); return ( diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 1c554b0..c8b98e7 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -203,6 +203,7 @@ "document-occupy": "Occupied by Documents", "violations-found": "Violations found", "total-violations": "Total violations", + "violations-registered": "Violations registered", "new": "new", "in-progress": "In progress", "it-decided": "It's decided", @@ -312,10 +313,35 @@ "open": "Open", "file-type": "File type", "file-not-found": "File not found", - "all-file-violations" : "All file violations", - "previous" : "Previous", + "all-file-violations": "All file violations", + "previous": "Previous", "next": "Next", - "source": "Source" + "source": "Source", + "check-activity-by-content-type": "Check activity by content type", + "summary-statistics": "Summary statistics", + "general-indicators-of-the-protection-system": "General indicators of the protection system", + "total-number-of-checks": "Total number of checks", + "protected-content": "Protected content", + "geography-of-violations": "Geography of violations", + "activity-by-month": "Activity by month", + "january": "January", + "february": "February", + "march": "March", + "april": "April", + "may": "May", + "june": "June", + "july": "July", + "august": "August", + "september": "September", + "october": "October", + "november": "November", + "december": "December", + "russia": "Russia", + "usa": "USA", + "germany": "Germany", + "france": "France", + "uk": "United Kingdom", + "china": "China" }, "Login-register-form": { "and": "and", diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index 5e3a985..aa7555e 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -203,6 +203,7 @@ "document-occupy": "Занимают документы", "violations-found": "Найдено нарушений", "total-violations": "Всего нарушений", + "violations-registered": "Нарушений зарегистрированно", "new": "Новые", "in-progress": "В работе", "it-decided": "Решено", @@ -313,9 +314,34 @@ "file-type": "Тип файла", "file-not-found": "Файл не найден", "all-file-violations": "Все нарушения файла", - "previous" : "Предыдущая", + "previous": "Предыдущая", "next": "Следующая", - "source": "Источник" + "source": "Источник", + "check-activity-by-content-type": "Активность проверок по типам контента", + "summary-statistics": "Итоговая статистика", + "general-indicators-of-the-protection-system": "Общие показатели системы защиты", + "total-number-of-checks": "Всего проверок", + "protected-content": "Защищенного контента", + "geography-of-violations": "География нарушений", + "activity-by-month": "Активность по месяцам", + "january": "Январь", + "february": "Февраль", + "march": "Март", + "april": "Апрель", + "may": "Май", + "june": "Июнь", + "july": "Июль", + "august": "Август", + "september": "Сентябрь", + "october": "Октябрь", + "november": "Ноябрь", + "december": "Декабрь", + "russia": "Россия", + "usa": "США", + "germany": "Германия", + "france": "Франция", + "uk": "Великобритания", + "china": "Китай" }, "Login-register-form": { "and": "и",