diff --git a/src/app/[locale]/pages/marking-audio/page.tsx b/src/app/[locale]/pages/marking-audio/page.tsx
index 96acb02..4286152 100644
--- a/src/app/[locale]/pages/marking-audio/page.tsx
+++ b/src/app/[locale]/pages/marking-audio/page.tsx
@@ -3,6 +3,45 @@ import FilesTable from '@/app/ui/dashboard/files-table';
import PageTitle from '@/app/ui/page-title';
import UploadSectionFile from '@/app/components/upload-section-file';
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
+import { StackedBarChart } from '@/app/components/StackedBarChart';
+
+const data = [
+ {
+ name: 'File A',
+ checks: 4000,
+ violations: 2000
+ },
+ {
+ name: 'File B',
+ checks: 3000,
+ violations: 1400
+ },
+ {
+ name: 'File C',
+ checks: 2000,
+ violations: 1000
+ },
+ {
+ name: 'File D',
+ checks: 2780,
+ violations: 1000
+ },
+ {
+ name: 'File E',
+ checks: 5090,
+ violations: 4800
+ },
+ {
+ name: 'File F',
+ checks: 5390,
+ violations: 3800
+ },
+ {
+ name: 'File H',
+ checks: 4000,
+ violations: 1500
+ }
+];
export default async function Page() {
const FILE_TYPE = "audio";
@@ -11,7 +50,12 @@ export default async function Page() {
return (
diff --git a/src/app/[locale]/pages/marking-photo/page.tsx b/src/app/[locale]/pages/marking-photo/page.tsx
index fa06cbc..6f433b7 100644
--- a/src/app/[locale]/pages/marking-photo/page.tsx
+++ b/src/app/[locale]/pages/marking-photo/page.tsx
@@ -3,6 +3,45 @@ import FilesTable from '@/app/ui/dashboard/files-table';
import PageTitle from '@/app/ui/page-title';
import UploadSectionFile from '@/app/components/upload-section-file';
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
+import {StackedBarChart} from '@/app/components/StackedBarChart';
+
+const data = [
+ {
+ name: 'File A',
+ checks: 4000,
+ violations: 2000
+ },
+ {
+ name: 'File B',
+ checks: 3000,
+ violations: 1400
+ },
+ {
+ name: 'File C',
+ checks: 2000,
+ violations: 1000
+ },
+ {
+ name: 'File D',
+ checks: 2780,
+ violations: 1000
+ },
+ {
+ name: 'File E',
+ checks: 5090,
+ violations: 4800
+ },
+ {
+ name: 'File F',
+ checks: 5390,
+ violations: 3800
+ },
+ {
+ name: 'File H',
+ checks: 4000,
+ violations: 1500
+ }
+];
export default async function Page() {
const FILE_TYPE = "image";
@@ -11,7 +50,12 @@ export default async function Page() {
return (
diff --git a/src/app/[locale]/pages/marking-video/page.tsx b/src/app/[locale]/pages/marking-video/page.tsx
index 51f9bbd..3123798 100644
--- a/src/app/[locale]/pages/marking-video/page.tsx
+++ b/src/app/[locale]/pages/marking-video/page.tsx
@@ -3,6 +3,45 @@ import FilesTable from '@/app/ui/dashboard/files-table';
import PageTitle from '@/app/ui/page-title';
import UploadSectionFile from '@/app/components/upload-section-file';
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
+import { StackedBarChart } from '@/app/components/StackedBarChart';
+
+const data = [
+ {
+ name: 'File A',
+ checks: 4000,
+ violations: 2000
+ },
+ {
+ name: 'File B',
+ checks: 3000,
+ violations: 1400
+ },
+ {
+ name: 'File C',
+ checks: 2000,
+ violations: 1000
+ },
+ {
+ name: 'File D',
+ checks: 2780,
+ violations: 1000
+ },
+ {
+ name: 'File E',
+ checks: 5090,
+ violations: 4800
+ },
+ {
+ name: 'File F',
+ checks: 5390,
+ violations: 3800
+ },
+ {
+ name: 'File H',
+ checks: 4000,
+ violations: 1500
+ }
+];
export default async function Page() {
const FILE_TYPE = "video";
@@ -11,7 +50,12 @@ export default async function Page() {
return (
diff --git a/src/app/components/StackedBarChart.tsx b/src/app/components/StackedBarChart.tsx
index 4ea4ecf..8ef1159 100644
--- a/src/app/components/StackedBarChart.tsx
+++ b/src/app/components/StackedBarChart.tsx
@@ -1,3 +1,5 @@
+'use client'
+
import { useTranslations } from 'next-intl';
import { BarChart, Bar, Cell, XAxis, Tooltip } from 'recharts';
@@ -139,47 +141,65 @@ export const StackedBarChart = ({ data }: Files) => {
};
return (
-
- {/* */}
-
-
- {data.map((_entry, index) => (
- |
- ))}
-
-
- {data.map((_entry, index) => (
- |
- ))}
-
-
+ <>
+
+
+
+ {/* */}
+
+
+ {data.map((_entry, index) => (
+ |
+ ))}
+
+
+ {data.map((_entry, index) => (
+
+ ))}
+ |
+
+
+
+
+ {t('check')}: 777
+
+
+ {t('violations')}: 777
+
+
+
+ >
);
};
\ No newline at end of file
diff --git a/src/app/styles/pages-styles.scss b/src/app/styles/pages-styles.scss
index 2d7eed4..7c2c351 100644
--- a/src/app/styles/pages-styles.scss
+++ b/src/app/styles/pages-styles.scss
@@ -78,10 +78,27 @@
justify-content: center;
align-items: center;
+ &.total-checks,
+ &.total-files {
+ display: grid;
+ grid-template-columns: 1fr 1.5fr;
+ gap: 0 10px;
+
+ .protection-stat-value {
+ justify-self: end;
+ padding-right: 10px;
+ padding-left: 10px;
+ }
+
+ .protection-stat-label {
+ text-align: start;
+ }
+ }
+
&-row {
display: flex;
align-items: center;
- justify-content: start;
+ justify-content: center;
gap: 10px;
width: 100%;
}
@@ -99,6 +116,7 @@
&-label {
font-size: 14px;
opacity: 0.9;
+ text-align: center;
}
&-total-info {
@@ -150,6 +168,11 @@
transition: all 0.3s ease;
}
}
+
+ &:has(.stacked-bar-chart) {
+ height: 100%;
+ padding-left: 100px;
+ }
}
&-switch {
@@ -157,6 +180,10 @@
right: 10px;
top: 10px;
}
+
+ &:has(.stacked-bar-chart) {
+ padding: 0;
+ }
}
.stats-wrapper {
diff --git a/src/app/ui/dashboard/protection-overview.tsx b/src/app/ui/dashboard/protection-overview.tsx
index 326a102..2fdc001 100644
--- a/src/app/ui/dashboard/protection-overview.tsx
+++ b/src/app/ui/dashboard/protection-overview.tsx
@@ -39,7 +39,7 @@ export default function ProtectionOverview() {
{t('total-files')}
-
+ {/*
0
{t('check')}
@@ -48,6 +48,13 @@ export default function ProtectionOverview() {
0
{t('violations')}
+
*/}
+
+
0
+
{t('check')}
+
0
+
{t('violations')}
+
>
) : (
diff --git a/src/app/ui/marking-page/protection-summary.tsx b/src/app/ui/marking-page/protection-summary.tsx
index 2981eec..4f9edd3 100644
--- a/src/app/ui/marking-page/protection-summary.tsx
+++ b/src/app/ui/marking-page/protection-summary.tsx
@@ -1,128 +1,32 @@
'use client'
-import { useState } from 'react';
-import { StackedBarChart } from '@/app/components/StackedBarChart';
import { useTranslations } from 'next-intl';
-const data = [
- {
- name: 'File A',
- checks: 4000,
- violations: 2000
- },
- {
- name: 'File B',
- checks: 3000,
- violations: 1400
- },
- {
- name: 'File C',
- checks: 2000,
- violations: 1000
- },
- {
- name: 'File D',
- checks: 2780,
- violations: 1000
- },
- {
- name: 'File E',
- checks: 5090,
- violations: 4800
- },
- {
- name: 'File F',
- checks: 5390,
- violations: 3800
- },
- {
- name: 'File H',
- checks: 4000,
- violations: 1500
- }
-];
-
export default function ProtectionSummary() {
- const [isOpen, setIsOpen] = useState(false);
const t = useTranslations('Global');
return (
-
+
{t('protecting-your-content')}
{t('current-status-of')}
-
+
-
- {isOpen ? (
- <>
-
0
-
- {t('size')}
-
- >
- ) :
- <>
-
-
-
0
-
{t('violations')}
-
- >
- }
+
0
+
{t('check')}
+
0
+
{t('violations')}
- {isOpen ? (
-
-
-
-
-
-
- {t('check')}: 777
-
-
- {t('violations')}: 777
-
-
+
+
0 / 0
+
+ {t('disk-space-used')}
- ) : (
-
- )}
+
-
)
}
\ No newline at end of file