// SettingPage.tsx import React, { useState, useRef, useEffect } from "react"; import { useLockFn } from "ahooks"; import { useTranslation } from "react-i18next"; import { openWebUrl } from "@/services/cmds"; import SettingVergeBasic from "@/components/setting/setting-verge-basic"; import SettingVergeAdvanced from "@/components/setting/setting-verge-advanced"; import SettingClash from "@/components/setting/setting-clash"; import SettingSystem from "@/components/setting/setting-system"; import { showNotice } from "@/services/noticeService"; import { useNavigate } from "react-router-dom"; import { Button } from "@/components/ui/button"; // --- НАЧАЛО ИЗМЕНЕНИЙ --- // Убираем CardHeader и CardTitle из импортов import { Card, CardContent } from "@/components/ui/card"; // --- КОНЕЦ ИЗМЕНЕНИЙ --- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Menu, Github, HelpCircle, Send } from "lucide-react"; import { cn } from "@root/lib/utils"; const SettingPage = () => { const { t } = useTranslation(); const navigate = useNavigate(); const scrollContainerRef = useRef(null); const [isScrolled, setIsScrolled] = useState(false); useEffect(() => { const scrollContainer = scrollContainerRef.current; const handleScroll = () => { if (scrollContainer) { setIsScrolled(scrollContainer.scrollTop > 10); } }; scrollContainer?.addEventListener("scroll", handleScroll); return () => { scrollContainer?.removeEventListener("scroll", handleScroll); }; }, []); const onError = (err: any) => showNotice("error", err?.message || err.toString()); const toGithubRepo = useLockFn(() => openWebUrl("https://github.com/clash-verge-rev/clash-verge-rev"), ); const toGithubDoc = useLockFn(() => openWebUrl("https://clash-verge-rev.github.io/index.html"), ); const toTelegramChannel = useLockFn(() => openWebUrl("https://t.me/clash_verge_re"), ); const menuItems = [ { label: t("Home"), path: "/home" }, { label: t("Profiles"), path: "/profile" }, { label: t("Logs"), path: "/logs" }, { label: t("Proxies"), path: "/proxies" }, { label: t("Connections"), path: "/connections" }, { label: t("Rules"), path: "/rules" }, ]; return (

{t("Settings")}

{/* ...кнопки... */} {t("Menu")} {menuItems.map((item) => ( navigate(item.path)} disabled={location.pathname === item.path} > {item.label} ))}
{/* --- НАЧАЛО ИЗМЕНЕНИЙ --- */} {/* Column 1 */}
{/* Column 2 */}
{/* --- КОНЕЦ ИЗМЕНЕНИЙ --- */}
); }; export default SettingPage;