add market-page layouts, v1 for endpoints

This commit is contained in:
smanylov
2025-12-05 16:19:13 +07:00
parent 6a290832d6
commit fcb87c180c
13 changed files with 289 additions and 11 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ export async function logout() {
const token = await getSessionData('token'); const token = await getSessionData('token');
try { try {
await fetch(`${API_BASE_URL}/api/auth/logout`, { await fetch(`${API_BASE_URL}v1/api/auth/logout`, {
method: 'POST', method: 'POST',
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -43,7 +43,7 @@ export async function authorization(
try { try {
const { email, password } = validatedFields.data; const { email, password } = validatedFields.data;
const response = await fetch(`${API_BASE_URL}/api/auth/login`, { const response = await fetch(`${API_BASE_URL}v1/api/auth/login`, {
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
email: email, email: email,
@@ -100,7 +100,7 @@ export async function registration(
try { try {
const { full_name, email, password } = validatedFields.data; const { full_name, email, password } = validatedFields.data;
const response = await fetch(`${API_BASE_URL}/api/auth/register`, { const response = await fetch(`${API_BASE_URL}v1/api/auth/register`, {
method: 'POST', method: 'POST',
body: JSON.stringify({ fullName: full_name, email, password }), body: JSON.stringify({ fullName: full_name, email, password }),
headers: { headers: {
+1 -1
View File
@@ -36,7 +36,7 @@ export async function getUserData() {
const token = await getSessionData('token'); const token = await getSessionData('token');
try { try {
const response = await fetch(`${API_BASE_URL}/api/user?email=${userEmail}`, { const response = await fetch(`${API_BASE_URL}v1/api/user?email=${userEmail}`, {
method: 'GET', method: 'GET',
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
+16
View File
@@ -0,0 +1,16 @@
import ProtectedFilesTable from '@/app/ui/marking-page/protected-files-table';
import ProtectionSummary from '@/app/ui/marking-page/protection-summary';
import TestSection from '@/app/ui/marking-page/test-section';
import UploadSection from '@/app/ui/marking-page/upload-section';
export default function Page() {
return (
<div>
<h1 className="page-title">🛡 Защита изображений</h1>
<ProtectionSummary />
<UploadSection />
<TestSection />
<ProtectedFilesTable />
</div>
)
}
+1
View File
@@ -3,6 +3,7 @@
@use './settings.scss'; @use './settings.scss';
@use './payment-container.scss'; @use './payment-container.scss';
@use './reports.scss'; @use './reports.scss';
@use './marking-pages.scss';
.btn { .btn {
padding: 12px 24px; padding: 12px 24px;
+7
View File
@@ -17,4 +17,11 @@ a {
text-decoration: none; text-decoration: none;
} }
h1,
h2,
h3,
h4 {
font-weight: bold;
}
@import "tailwindcss"; @import "tailwindcss";
+129
View File
@@ -0,0 +1,129 @@
.protection-summary {
background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
border: 2px solid #4caf50;
border-radius: 15px;
padding: 20px;
margin-bottom: 25px;
text-align: center;
h3 {
color: #2e7d32;
margin-bottom: 15px;
font-size: 18px;
}
.protection-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
margin-top: 15px;
}
.stat-card {
background: rgba(255, 255, 255, 0.8);
padding: 15px;
border-radius: 10px;
text-align: center;
}
.stat-number {
font-size: 24px;
font-weight: bold;
color: #2e7d32;
}
.stat-label {
font-size: 12px;
color: #666;
margin-top: 5px;
}
}
.upload-section {
background: white;
border-radius: 20px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
h3 {
margin-bottom: 20px;
color: #111827;
font-size: 20px;
}
.drag-drop-zone {
border: 3px dashed #6366f1;
border-radius: 15px;
padding: 40px 20px;
text-align: center;
background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
margin-bottom: 20px;
transition: all 0.3s ease;
h4 {
color: #6366f1;
margin-bottom: 10px;
}
p {
color: #6b7280;
margin-bottom: 20px;
}
.btn-primary {
background: linear-gradient(45deg, #6566f1, #01579b);
}
}
}
.test-section {
background: linear-gradient(135deg, #fff3e0, #ffe0b2);
border-radius: 20px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
h3 {
margin-bottom: 20px;
color: #e65100;
font-size: 20px;
}
.test-section-content {
border: 2px dashed #ff9800;
border-radius: 10px;
padding: 20px;
text-align: center;
background: #fff8e1;
h4 {
font-size: 32px;
margin-bottom: 10px;
}
.btn {
background: linear-gradient(45deg, #ff9800, #f57c00);
}
p {
margin-top: 15px;
font-size: 12px;
color: #e65100;
}
}
}
.protected-files-table {
background: white;
border-radius: 15px;
overflow: hidden;
margin-top: 30px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
h3 {
padding: 20px 20px 0;
color: #111827;
font-size: 18px;
}
}
-3
View File
@@ -20,7 +20,6 @@
margin-bottom: 16px; margin-bottom: 16px;
color: #1e293b; color: #1e293b;
font-size: 1.15rem; font-size: 1.15rem;
font-weight: bold;
} }
} }
@@ -306,7 +305,6 @@
align-items: center; align-items: center;
gap: 8px; gap: 8px;
font-size: 1.1rem; font-size: 1.1rem;
font-weight: bold;
} }
.secure-payments-grid { .secure-payments-grid {
@@ -328,7 +326,6 @@
color: #1e293b; color: #1e293b;
margin-bottom: 6px; margin-bottom: 6px;
font-size: 0.95rem; font-size: 0.95rem;
font-weight: bold;
} }
p { p {
-3
View File
@@ -196,7 +196,6 @@
color: #1e40af; color: #1e40af;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
font-weight: bold;
} }
p { p {
@@ -263,14 +262,12 @@
h3 { h3 {
color: #dc2626; color: #dc2626;
margin-bottom: 15px; margin-bottom: 15px;
font-weight: bold;
font-size: 1.17em; font-size: 1.17em;
} }
h4 { h4 {
color: #991b1b; color: #991b1b;
margin-bottom: 10px; margin-bottom: 10px;
font-weight: bold;
} }
p { p {
@@ -0,0 +1,65 @@
export default function ProtectedFilesTable() {
return (
<div className="protected-files-table">
<h3>
📋 Защищенные изображения (0)
</h3>
<table>
<thead>
<tr>
<th>ФАЙЛ</th>
<th>РАЗМЕР</th>
<th>ЗАЩИТА</th>
<th>ДАТА</th>
<th>ДЕЙСТВИЯ</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div>
<div>
🛡
</div>
<div>
<div>
Screenshot 2025-11-13 at 10.20.14.p...
</div>
<div>
ПОЛНАЯ ЗАЩИТА
<span className="real-protection-badge">
ВСЕ МОДУЛИ
</span>
</div>
</div>
</div>
</td>
<td>
1.93 МБ
</td>
<td>
<div>
<div>
<div></div>
</div>
<span>
100%
</span>
</div>
</td>
<td>
27.11.2025 10:16
</td>
<td>
<button className="btn btn-secondary">
📥 Скачать
</button>
</td>
</tr>
</tbody>
</table>
</div>
)
}
@@ -0,0 +1,25 @@
export default function ProtectionSummary() {
return (
<div className="protection-summary">
<h3>📊 Статистика защиты</h3>
<div className="protection-stats">
<div className="stat-card">
<div className="stat-number">0</div>
<div className="stat-label">Всего файлов</div>
</div>
<div className="stat-card">
<div className="stat-number">0</div>
<div className="stat-label">Защищено</div>
</div>
<div className="stat-card">
<div className="stat-number">0</div>
<div className="stat-label">Изображений</div>
</div>
<div className="stat-card">
<div className="stat-number">100%</div>
<div className="stat-label">Уровень защиты</div>
</div>
</div>
</div>
)
}
+20
View File
@@ -0,0 +1,20 @@
export default function TestSection() {
return (
<div className="test-section">
<h3>
🔍 Проверить защиту изображения
</h3>
<div className="test-section-content">
<h4>
🔍
</h4>
<button className="btn btn-primary">
🔍 Выбрать изображение для анализа
</button>
<p>
При обнаружении защиты будет показана полная информация о владельце (WEBP НЕ поддерживается)
</p>
</div>
</div>
)
}
@@ -0,0 +1,21 @@
export default function UploadSection() {
return (
<div className="upload-section">
<h3>
📷 Загрузить изображение для защиты
</h3>
<div className="drag-drop-zone">
<div className="text-[48px] mb-[15px]">🛡</div>
<h4>
Перетащите изображения сюда
</h4>
<p>
Размер: 150x150 - 4000x4000 пикселей, форматы: JPG, PNG, GIF, BMP (WEBP НЕ поддерживается)
</p>
<button className="btn btn-primary">
🛡 Выбрать файлы для защиты
</button>
</div>
</div>
)
}
+1 -1
View File
@@ -15,7 +15,7 @@ export default function DropDownList() {
const links = [ const links = [
{ {
name: 'Маркировка фото', name: 'Маркировка фото',
href: '/pages/emptypage' href: '/pages/marking-photo'
}, },
{ {
name: 'Маркировка видео', name: 'Маркировка видео',