From f5e4aa03fc35d5fff616fca54cbc437d336fdc8c Mon Sep 17 00:00:00 2001 From: Markov Date: Mon, 23 Feb 2026 11:22:29 +0100 Subject: [PATCH] feat: settings page with agents section, gear icon in sidebar --- .../{ => settings}/agents/page.tsx | 0 src/app/(protected)/settings/layout.tsx | 54 +++++++++++++++++++ src/app/(protected)/settings/page.tsx | 10 ++++ src/components/Sidebar.tsx | 23 +++----- 4 files changed, 71 insertions(+), 16 deletions(-) rename src/app/(protected)/{ => settings}/agents/page.tsx (100%) create mode 100644 src/app/(protected)/settings/layout.tsx create mode 100644 src/app/(protected)/settings/page.tsx diff --git a/src/app/(protected)/agents/page.tsx b/src/app/(protected)/settings/agents/page.tsx similarity index 100% rename from src/app/(protected)/agents/page.tsx rename to src/app/(protected)/settings/agents/page.tsx diff --git a/src/app/(protected)/settings/layout.tsx b/src/app/(protected)/settings/layout.tsx new file mode 100644 index 0000000..afaf01c --- /dev/null +++ b/src/app/(protected)/settings/layout.tsx @@ -0,0 +1,54 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { logout } from "@/lib/auth-client"; + +const MENU = [ + { href: "/settings", label: "Общие", icon: "⚙️" }, + { href: "/settings/agents", label: "Агенты", icon: "🤖" }, +]; + +export default function SettingsLayout({ children }: { children: React.ReactNode }) { + const pathname = usePathname(); + + return ( +
+ +
+ {children} +
+
+ ); +} diff --git a/src/app/(protected)/settings/page.tsx b/src/app/(protected)/settings/page.tsx new file mode 100644 index 0000000..74a87c7 --- /dev/null +++ b/src/app/(protected)/settings/page.tsx @@ -0,0 +1,10 @@ +"use client"; + +export default function SettingsPage() { + return ( +
+

⚙️ Общие настройки

+
Скоро здесь будут настройки проекта.
+
+ ); +} diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 7415e86..61935b1 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -3,7 +3,6 @@ import { useState } from "react"; import Link from "next/link"; import { Project } from "@/lib/api"; -import { logout } from "@/lib/auth-client"; interface Props { projects: Project[]; @@ -39,16 +38,6 @@ export default function Sidebar({ projects, activeSlug }: Props) { Новый проект - setOpen(false)} - className="flex items-center gap-2 px-3 py-2 mb-2 rounded text-sm text-[var(--fg)] - hover:bg-white/5 transition-colors" - > - 🤖 - Агенты - -
Проекты
{projects.map((p) => ( Team Board v0.2 - + ⚙️ + );