fix: conflicts

This commit is contained in:
nikita
2026-04-04 06:17:09 +03:00
13 changed files with 1882 additions and 295 deletions
@@ -1,5 +1,14 @@
import { useNavigate, useLocation } from "react-router-dom";
import { FaHome, FaServer, FaPalette, FaUser, FaCode } from "react-icons/fa";
import { FaCode } from "react-icons/fa";
import {
FaHome,
FaServer,
FaPalette,
FaUser,
FaUsers,
FaRocket,
FaKey,
} from "react-icons/fa";
import { useAuthStore } from "@/modules/auth/store/useAuthStore";
export const Navigation = () => {
@@ -11,6 +20,9 @@ export const Navigation = () => {
{ path: "/", label: "Главная", icon: FaHome },
{ path: "/add-agents", label: "Агенты", icon: FaServer },
{ path: "/templates", label: "Шаблоны", icon: FaCode },
{ path: "/add-agents", label: "Деплой", icon: FaRocket },
{ path: "/registration", label: "Регистрация", icon: FaKey },
{ path: "/admin", label: "Админка", icon: FaUsers, adminOnly: true },
{ path: "/themes", label: "Темы", icon: FaPalette },
];
@@ -41,39 +53,44 @@ export const Navigation = () => {
{/* Навигация */}
<div className="flex items-center gap-1">
{navItems.map((item) => {
const Icon = item.icon;
const active = isActive(item.path);
return (
<button
key={item.path}
onClick={() => navigate(item.path)}
className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all"
style={{
backgroundColor: active ? "var(--accent)" : "transparent",
color: active
? "var(--accent-text)"
: "var(--text-secondary)",
}}
onMouseEnter={(e) => {
if (!active) {
e.currentTarget.style.backgroundColor =
"var(--bg-secondary)";
e.currentTarget.style.color = "var(--text-primary)";
}
}}
onMouseLeave={(e) => {
if (!active) {
e.currentTarget.style.backgroundColor = "transparent";
e.currentTarget.style.color = "var(--text-secondary)";
}
}}
>
<Icon size={12} />
<span>{item.label}</span>
</button>
);
})}
{navItems
.filter((item) => {
if (item.adminOnly && !user?.permission_admin) return false;
return true;
})
.map((item) => {
const Icon = item.icon;
const active = isActive(item.path);
return (
<button
key={item.path}
onClick={() => navigate(item.path)}
className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all"
style={{
backgroundColor: active ? "var(--accent)" : "transparent",
color: active
? "var(--accent-text)"
: "var(--text-secondary)",
}}
onMouseEnter={(e) => {
if (!active) {
e.currentTarget.style.backgroundColor =
"var(--bg-secondary)";
e.currentTarget.style.color = "var(--text-primary)";
}
}}
onMouseLeave={(e) => {
if (!active) {
e.currentTarget.style.backgroundColor = "transparent";
e.currentTarget.style.color = "var(--text-secondary)";
}
}}
>
<Icon size={12} />
<span>{item.label}</span>
</button>
);
})}
</div>
{/* Профиль пользователя */}
@@ -10,6 +10,8 @@ import { DefaultLayout } from "@/shared/layouts/DefaultLayout";
import { AddAgentsPage } from "@/pages/add-agents.page";
import { IDEPage } from "@/pages/ide.page";
import { TemplatesPage } from "@/pages/templates.page";
import { AdminPage } from "@/pages/admin.page";
import { RegistrationTokenPage } from "@/pages/registration.page";
export const mockGraphData: GraphData = {
nodes: [
@@ -120,6 +122,8 @@ export const Routing = () => {
<Route path="/" element={<HomePage />} />
<Route path="/themes" element={<ThemesPage />} />
<Route path="/add-agents" element={<AddAgentsPage />} />
<Route path="/registration" element={<RegistrationTokenPage />} />
<Route path="/admin" element={<AdminPage />} />
<Route path="/IDE" element={<IDEPage />} />
<Route path="/templates" element={<TemplatesPage />} />
</Route>