add document marking page
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "no-copy-frontend",
|
"name": "no-copy-frontend",
|
||||||
"version": "0.32.0",
|
"version": "0.33.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 2999",
|
"dev": "next dev -p 2999",
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
|
||||||
|
import FilesTable from '@/app/ui/dashboard/files-table';
|
||||||
|
import PageTitle from '@/app/ui/page-title';
|
||||||
|
import UploadSectionFile from '@/app/components/UploadSectionFile';
|
||||||
|
import { getAllowedFilesExtensions } from '@/app/actions/fileUpload';
|
||||||
|
import { StackedBarChart } from '@/app/components/StackedBarChart';
|
||||||
|
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
|
||||||
|
import ProtectionStatistic from '@/app/ui/marking-page/new/protection-statistic';
|
||||||
|
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
name: 'File A',
|
||||||
|
checks: 4,
|
||||||
|
violations: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'File B',
|
||||||
|
checks: 8,
|
||||||
|
violations: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'File C',
|
||||||
|
checks: 2,
|
||||||
|
violations: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'File D',
|
||||||
|
checks: 7,
|
||||||
|
violations: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'File E',
|
||||||
|
checks: 5,
|
||||||
|
violations: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'File F',
|
||||||
|
checks: 5,
|
||||||
|
violations: 3
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
const FILE_TYPE = "document";
|
||||||
|
const { file_extension, max_file_size } = await getAllowedFilesExtensions(FILE_TYPE);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<PageTitleColorFrame
|
||||||
|
title="audio-protection"
|
||||||
|
description="multi-layered-protection-for-your-audios"
|
||||||
|
/>
|
||||||
|
<ProtectionStatistic fileType={FILE_TYPE} />
|
||||||
|
{/* <div className="split-blocks">
|
||||||
|
<ProtectionSummary fileType={FILE_TYPE} />
|
||||||
|
<div className="protection-overview">
|
||||||
|
<StackedBarChart data={data} />
|
||||||
|
</div>
|
||||||
|
</div> */}
|
||||||
|
<UploadSectionFile fileType={FILE_TYPE} allowedExtensions={file_extension} maxFileSize={max_file_size} />
|
||||||
|
<FilesTable fileType={FILE_TYPE} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -214,6 +214,7 @@ export async function registration(
|
|||||||
phone: phone,
|
phone: phone,
|
||||||
password,
|
password,
|
||||||
accountType,
|
accountType,
|
||||||
|
/* referralLink: referralCode, */
|
||||||
...(accountType === 'b2b' && { companyName: companyName })
|
...(accountType === 'b2b' && { companyName: companyName })
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -223,6 +224,16 @@ export async function registration(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
fullName: fullName,
|
||||||
|
email,
|
||||||
|
phone: phone,
|
||||||
|
password,
|
||||||
|
accountType,
|
||||||
|
/* referralLink: referralCode, */
|
||||||
|
...(accountType === 'b2b' && { companyName: companyName })
|
||||||
|
})
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
let parsed = await response.json() as {
|
let parsed = await response.json() as {
|
||||||
message_desc: string,
|
message_desc: string,
|
||||||
@@ -230,6 +241,8 @@ export async function registration(
|
|||||||
message_code: number
|
message_code: number
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(parsed);
|
||||||
|
|
||||||
if (parsed.message_code === 0) {
|
if (parsed.message_code === 0) {
|
||||||
console.log(`registration - ${accountType}`);
|
console.log(`registration - ${accountType}`);
|
||||||
console.log({
|
console.log({
|
||||||
@@ -238,6 +251,7 @@ export async function registration(
|
|||||||
phone: phone,
|
phone: phone,
|
||||||
password,
|
password,
|
||||||
accountType,
|
accountType,
|
||||||
|
referralLink: 'fds324',
|
||||||
...(accountType === 'b2b' && { companyName: companyName })
|
...(accountType === 'b2b' && { companyName: companyName })
|
||||||
});
|
});
|
||||||
await createSession(parsed.message_body.token, email as string);
|
await createSession(parsed.message_body.token, email as string);
|
||||||
|
|||||||
@@ -350,7 +350,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sub-link {
|
.sub-link {
|
||||||
padding: 12px 50px;
|
padding: 12px 12px 12px 32px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ export default function DropDownList() {
|
|||||||
{
|
{
|
||||||
name: t('audio-marking'),
|
name: t('audio-marking'),
|
||||||
href: '/pages/marking-audio'
|
href: '/pages/marking-audio'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: t('document-marking'),
|
||||||
|
href: '/pages/marking-document'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
"make-check": "Check",
|
"make-check": "Check",
|
||||||
"checks": "Checks",
|
"checks": "Checks",
|
||||||
"checks-few": "Checks",
|
"checks-few": "Checks",
|
||||||
|
"document": "Document",
|
||||||
"documents": "Documents",
|
"documents": "Documents",
|
||||||
"video": "video",
|
"video": "video",
|
||||||
"videos": "Videos",
|
"videos": "Videos",
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
"photo-marking": "Photo marking",
|
"photo-marking": "Photo marking",
|
||||||
"video-marking": "Video marking",
|
"video-marking": "Video marking",
|
||||||
"audio-marking": "Audio marking",
|
"audio-marking": "Audio marking",
|
||||||
|
"document-marking": "Document marking",
|
||||||
"tokens": "tokens",
|
"tokens": "tokens",
|
||||||
"current-balance-of-protection": "Current file protection token balance",
|
"current-balance-of-protection": "Current file protection token balance",
|
||||||
"rate": "Rate",
|
"rate": "Rate",
|
||||||
@@ -185,13 +187,16 @@
|
|||||||
"protected-audio": "Protected audio",
|
"protected-audio": "Protected audio",
|
||||||
"image-protected": "Images Protected",
|
"image-protected": "Images Protected",
|
||||||
"video-protected": "Videos Protected",
|
"video-protected": "Videos Protected",
|
||||||
"audio-protected": "Audio Protected",
|
"audio-protected": "Audios Protected",
|
||||||
|
"document-protected": "Documents Protected",
|
||||||
"image-checked": "Images Checked",
|
"image-checked": "Images Checked",
|
||||||
"video-checked": "Videos Checked",
|
"video-checked": "Videos Checked",
|
||||||
"audio-checked": "Audio Checked",
|
"audio-checked": "Audios Checked",
|
||||||
|
"document-checked": "Documents Checked",
|
||||||
"image-occupy": "Occupied by Images",
|
"image-occupy": "Occupied by Images",
|
||||||
"video-occupy": "Occupied by Videos",
|
"video-occupy": "Occupied by Videos",
|
||||||
"audio-occupy": "Occupied by Audio",
|
"audio-occupy": "Occupied by Audios",
|
||||||
|
"document-occupy": "Occupied by Documents",
|
||||||
"violations-found": "Violations found",
|
"violations-found": "Violations found",
|
||||||
"total-violations": "Total violations",
|
"total-violations": "Total violations",
|
||||||
"new": "new",
|
"new": "new",
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
"make-check": "Проверить",
|
"make-check": "Проверить",
|
||||||
"checks": "Проверок",
|
"checks": "Проверок",
|
||||||
"checks-few": "Проверки",
|
"checks-few": "Проверки",
|
||||||
|
"document": "документ",
|
||||||
"documents": "Документы",
|
"documents": "Документы",
|
||||||
"video": "видео",
|
"video": "видео",
|
||||||
"videos": "Видео",
|
"videos": "Видео",
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
"photo-marking": "Маркировка фото",
|
"photo-marking": "Маркировка фото",
|
||||||
"video-marking": "Маркировка видео",
|
"video-marking": "Маркировка видео",
|
||||||
"audio-marking": "Маркировка аудио",
|
"audio-marking": "Маркировка аудио",
|
||||||
|
"document-marking": "Маркировка документов",
|
||||||
"tokens": "токенов",
|
"tokens": "токенов",
|
||||||
"current-balance-of-protection": "Текущий баланс токенов для защиты файлов",
|
"current-balance-of-protection": "Текущий баланс токенов для защиты файлов",
|
||||||
"rate": "Тариф",
|
"rate": "Тариф",
|
||||||
@@ -186,12 +188,15 @@
|
|||||||
"image-protected": "Изображений защищено",
|
"image-protected": "Изображений защищено",
|
||||||
"video-protected": "Видео защищено",
|
"video-protected": "Видео защищено",
|
||||||
"audio-protected": "Аудио защищено",
|
"audio-protected": "Аудио защищено",
|
||||||
|
"document-protected": "Документов защищено",
|
||||||
"image-checked": "Изображений проверялось",
|
"image-checked": "Изображений проверялось",
|
||||||
"video-checked": "Видео проверялось",
|
"video-checked": "Видео проверялось",
|
||||||
"audio-checked": "Аудио проверялось",
|
"audio-checked": "Аудио проверялось",
|
||||||
|
"document-checked": "Документов проверялось",
|
||||||
"image-occupy": "Занимают изображения",
|
"image-occupy": "Занимают изображения",
|
||||||
"video-occupy": "Занимают видео",
|
"video-occupy": "Занимают видео",
|
||||||
"audio-occupy": "Занимают аудио",
|
"audio-occupy": "Занимают аудио",
|
||||||
|
"document-occupy": "Занимают документы",
|
||||||
"violations-found": "Найдено нарушений",
|
"violations-found": "Найдено нарушений",
|
||||||
"total-violations": "Всего нарушений",
|
"total-violations": "Всего нарушений",
|
||||||
"new": "Новые",
|
"new": "Новые",
|
||||||
|
|||||||
Reference in New Issue
Block a user