fix: homepage entry lightweight mode exiting Macos tray icon

fix: lightweight mode better handling and logging logic
This commit is contained in:
Tunglies
2025-03-20 23:17:37 +08:00
parent 11b8c8be45
commit 2e38404434
5 changed files with 34 additions and 21 deletions

View File

@@ -37,7 +37,11 @@ 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 { entry_lightweight_mode, openWebUrl, patchVergeConfig } from "@/services/cmds";
import {
entry_lightweight_mode,
openWebUrl,
patchVergeConfig,
} from "@/services/cmds";
import { TestCard } from "@/components/home/test-card";
import { IpInfoCard } from "@/components/home/ip-info-card";
@@ -260,7 +264,11 @@ const HomePage = () => {
header={
<Box sx={{ display: "flex", alignItems: "center" }}>
<Tooltip title={t("LightWeight Mode")} arrow>
<IconButton onClick={() => entry_lightweight_mode()} size="small" color="inherit">
<IconButton
onClick={async () => await entry_lightweight_mode()}
size="small"
color="inherit"
>
<HistoryEduOutlined />
</IconButton>
</Tooltip>