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:
Ник (Claude)
2026-06-12 23:57:38 +03:00
parent d888816f2b
commit 1fbdc9f9b9
7 changed files with 369 additions and 15 deletions
+18
View File
@@ -0,0 +1,18 @@
'use client';
import { useRouter } from 'next/navigation';
import { ArrowLeft } from 'lucide-react';
export default function BackButton({ href, label = 'Назад' }) {
const router = useRouter();
function go() {
if (href) router.push(href);
else if (window.history.length > 1) router.back();
else router.push('/');
}
return (
<button onClick={go} className="btn-ghost flex items-center gap-1.5 text-sm text-gray-400 hover:text-gray-200 mb-4 -ml-1">
<ArrowLeft className="w-4 h-4" />
{label}
</button>
);
}