From f18a8c901f29165088959647abf5b8b1a765e351 Mon Sep 17 00:00:00 2001 From: Tunglies Date: Wed, 19 Mar 2025 02:18:20 +0800 Subject: [PATCH] feat: add lite mode toggle to home page --- src/pages/home.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/home.tsx b/src/pages/home.tsx index a5a8eaf7..272abeff 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -23,6 +23,7 @@ import { DnsOutlined, SpeedOutlined, HelpOutlineRounded, + HistoryEduOutlined, } from "@mui/icons-material"; import { useNavigate } from "react-router-dom"; import { ProxyTunCard } from "@/components/home/proxy-tun-card"; @@ -36,7 +37,7 @@ import { BasePage } from "@/components/base"; import { ClashInfoCard } from "@/components/home/clash-info-card"; import { SystemInfoCard } from "@/components/home/system-info-card"; import { useLockFn } from "ahooks"; -import { openWebUrl } from "@/services/cmds"; +import { openWebUrl, patchVergeConfig } from "@/services/cmds"; import { TestCard } from "@/components/home/test-card"; import { IpInfoCard } from "@/components/home/ip-info-card"; @@ -258,6 +259,11 @@ const HomePage = () => { contentStyle={{ padding: 2 }} header={ + + patchVergeConfig({ enable_lite_mode: true })} size="small" color="inherit"> + + + @@ -275,9 +281,9 @@ const HomePage = () => { {/* 订阅和当前节点部分 */} {homeCards.profile && ( - )}