forked from admin/zeropost-tool
feat: unified admin panel + back buttons everywhere
AdminPanel.js: sidebar nav с 4 разделами (Настройки API, ЮKassa, Расходы AI, Пользователи) Встроены: SettingsSection (API-ключи), SpendingSection (расходы), AdminBilling Breadcrumb навигация /system/page.js: теперь рендерит AdminPanel Header: 'Расходы' → 'Админ' (ссылка на /system), убран TrendingUp BackButton.js: переиспользуемая кнопка назад Добавлена на /drafts, /billing, /plans
This commit is contained in:
+3
-11
@@ -1,11 +1,11 @@
|
||||
import { redirect } from 'next/navigation';
|
||||
import { requireUser } from '@/lib/session';
|
||||
import Header from '@/components/Header';
|
||||
import SystemSettings from '@/components/SystemSettings';
|
||||
import AdminPanel from '@/components/AdminPanel';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function SystemPage() {
|
||||
export default async function SystemPage({ searchParams }) {
|
||||
const user = await requireUser();
|
||||
if (!user) redirect('/login');
|
||||
if (!user.isAdmin) redirect('/');
|
||||
@@ -13,15 +13,7 @@ export default async function SystemPage() {
|
||||
return (
|
||||
<>
|
||||
<Header user={user} />
|
||||
<main className="max-w-4xl mx-auto p-4 sm:p-6">
|
||||
<div className="mb-6">
|
||||
<h1 className="text-2xl font-bold">Системные настройки</h1>
|
||||
<p className="text-sm text-gray-500 mt-1">
|
||||
Конфигурация внешних сервисов (поиск фото, билинги и т.п.). Видно только админам.
|
||||
</p>
|
||||
</div>
|
||||
<SystemSettings />
|
||||
</main>
|
||||
<AdminPanel initialSection={searchParams?.section || 'settings'} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user