adit header menu and dashboard
This commit is contained in:
@@ -22,17 +22,10 @@ export default function Page() {
|
||||
<h1 className="page-title">Статистика</h1>
|
||||
<ProtectionOverview />
|
||||
<StatsGrid />
|
||||
<div className="extended-stats-grid">
|
||||
<StorageBreakdown />
|
||||
<RecentFilesList />
|
||||
</div>
|
||||
<div className="charts-section">
|
||||
<ChartContainer />
|
||||
<UserInfo />
|
||||
</div>
|
||||
<StorageBreakdown />
|
||||
<ChartContainer />
|
||||
<ViolationsTable />
|
||||
<ViolationsTypeTable />
|
||||
<ActivityChart />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -163,12 +163,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.extended-stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.block-wrapper {
|
||||
background: white;
|
||||
border-radius: 20px;
|
||||
@@ -318,12 +312,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.charts-section {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.chart-container {
|
||||
.chart-header {
|
||||
display: flex;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
background: white;
|
||||
@@ -33,26 +33,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f8f9fa;
|
||||
border-radius: 20px;
|
||||
padding: 10px 20px;
|
||||
width: 300px;
|
||||
transition: all 0.3s;
|
||||
|
||||
input {
|
||||
border: none;
|
||||
outline: none;
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
font-size: 14px;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.notification-wrapper,
|
||||
.user-menu,
|
||||
.tokens-balance {
|
||||
@@ -201,6 +181,7 @@
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.user-dropdown {
|
||||
@@ -227,6 +208,7 @@
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.user-details {
|
||||
@@ -241,7 +223,8 @@
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.user-email {
|
||||
.user-email,
|
||||
.user-subscription-expire {
|
||||
font-size: 13px;
|
||||
color: #6b7280;
|
||||
margin-bottom: 8px;
|
||||
@@ -275,12 +258,13 @@
|
||||
|
||||
.subscription-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
background: #e6ebf1;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
.user-menu-footer {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* removed */
|
||||
|
||||
export default function ActivityChart() {
|
||||
return (
|
||||
<div className="activity-chart">
|
||||
|
||||
@@ -4,21 +4,17 @@ export default function ProtectionOverview() {
|
||||
<h3>Защита вашего контента</h3>
|
||||
<p>Текущий статус защищенности и активности системы мониторинга</p>
|
||||
<div className="protection-stats">
|
||||
<div className="protection-stat">
|
||||
<div className="protection-stat-value">0</div>
|
||||
<div className="protection-stat-label">Файлов с водяными знаками</div>
|
||||
</div>
|
||||
<div className="protection-stat">
|
||||
<div className="protection-stat-value">0</div>
|
||||
<div className="protection-stat-label">Высокий уровень защиты</div>
|
||||
</div>
|
||||
<div className="protection-stat">
|
||||
<div className="protection-stat-value">0</div>
|
||||
<div className="protection-stat-label">Всего проверок</div>
|
||||
</div>
|
||||
<div className="protection-stat">
|
||||
<div className="protection-stat-value">0%</div>
|
||||
<div className="protection-stat-label">Использовано лимитов</div>
|
||||
<div className="protection-stat-value">0</div>
|
||||
<div className="protection-stat-label">Файлов с водяными знаками</div>
|
||||
</div>
|
||||
<div className="protection-stat">
|
||||
<div className="protection-stat-value">0 / 0</div>
|
||||
<div className="protection-stat-label">Использовано места на диске</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* removed */
|
||||
|
||||
export default function RecentFilesList() {
|
||||
return (
|
||||
<div className="recent-files-list block-wrapper">
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* removed */
|
||||
|
||||
export default function UserInfo() {
|
||||
return (
|
||||
<div className="user-info block-wrapper">
|
||||
|
||||
@@ -5,12 +5,6 @@ import Link from 'next/link';
|
||||
export default function HeaderPanel() {
|
||||
return (
|
||||
<header className="header">
|
||||
<div className="search-bar">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" style={{ width: "20px", height: "20px", color: "#9ca3af" }}>
|
||||
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
|
||||
</svg>
|
||||
<input type="text" placeholder="Поиск контента..." id="global-search" />
|
||||
</div>
|
||||
<div className="header-action">
|
||||
<Link
|
||||
href={'/pages/payment'}
|
||||
@@ -25,15 +19,6 @@ export default function HeaderPanel() {
|
||||
</div>
|
||||
</Link>
|
||||
<NotificationsButton />
|
||||
<Link
|
||||
className="icon-btn"
|
||||
title="Быстрые настройки"
|
||||
href="/pages/settings"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" style={{ width: "20px", height: "20px" }}>
|
||||
<path d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.82,11.69,4.82,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"></path>
|
||||
</svg>
|
||||
</Link>
|
||||
<UserMenuButton />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useClickOutside } from '@/app/hooks/useClickOutside';
|
||||
import Link from 'next/link';
|
||||
import { getUserData } from '@/app/lib/action';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { logout } from '@/app/actions/auth';
|
||||
|
||||
export default function UserMenuButton() {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
@@ -60,32 +61,23 @@ export default function UserMenuButton() {
|
||||
{userData?.email ? userData.email : ''}
|
||||
</div>
|
||||
<div className="user-subscription">
|
||||
<span className="text-[14px]">Тариф: </span>
|
||||
<span className="subscription-badge">
|
||||
{userData?.subscriptionType ? userData.subscriptionType : ''}
|
||||
</span>
|
||||
<br />
|
||||
<span className="user-subscription-expire">Истекает: 00.00.00</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="user-menu-items">
|
||||
<Link href="/pages/dashboard" className="user-menu-item">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path>
|
||||
</svg>
|
||||
Главная
|
||||
</Link>
|
||||
<Link href="/pages/settings" className="user-menu-item">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.82,11.69,4.82,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"></path>
|
||||
</svg>
|
||||
Настройки
|
||||
</Link>
|
||||
<Link href="/pages/content" className="user-menu-item">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M20 6h-2.18c.11-.31.18-.65.18-1a2.996 2.996 0 0 0-5.5-1.65l-.5.67-.5-.68C10.96 2.54 10 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z"></path>
|
||||
</svg>
|
||||
Мой контент
|
||||
</Link>
|
||||
<Link href="/pages/faq" className="user-menu-item">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"></path>
|
||||
@@ -95,7 +87,14 @@ export default function UserMenuButton() {
|
||||
</div>
|
||||
|
||||
<div className="user-menu-footer">
|
||||
<Link href="/" className="user-menu-logout">
|
||||
<Link
|
||||
href="/"
|
||||
className="user-menu-logout"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
logout();
|
||||
}}
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"></path>
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user