feat: add lite mode toggle to home page

This commit is contained in:
Tunglies 2025-03-19 02:18:20 +08:00
parent 772ecdd3b0
commit 74e441df5b

View File

@ -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={
<Box sx={{ display: "flex", alignItems: "center" }}>
<Tooltip title={t("Lite Mode")} arrow>
<IconButton onClick={() => patchVergeConfig({ enable_lite_mode: true })} size="small" color="inherit">
<HistoryEduOutlined />
</IconButton>
</Tooltip>
<Tooltip title={t("Manual")} arrow>
<IconButton onClick={toGithubDoc} size="small" color="inherit">
<HelpOutlineRounded />