feat: add lightweight mode

This commit is contained in:
wonfen
2025-02-13 02:18:17 +08:00
parent f5760784bf
commit 3b0635e8a1
5 changed files with 57 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ const SettingVerge = ({ onError }: Props) => {
env_type,
startup_script,
start_page,
enable_lite_mode,
} = verge ?? {};
const configRef = useRef<DialogRef>(null);
const hotkeyRef = useRef<DialogRef>(null);
@@ -69,7 +70,7 @@ const SettingVerge = ({ onError }: Props) => {
const updateRef = useRef<DialogRef>(null);
const backupRef = useRef<DialogRef>(null);
const onChangeData = (patch: Partial<IVergeConfig>) => {
const onChangeData = (patch: any) => {
mutateVerge({ ...verge, ...patch }, false);
};
@@ -292,6 +293,14 @@ const SettingVerge = ({ onError }: Props) => {
<SettingItem onClick={openDevTools} label={t("Open Dev Tools")} />
<SettingItem
label={t("Lite Mode")}
extra={
<TooltipIcon title={t("Lite Mode Info")} sx={{ opacity: "0.7" }} />
}
onClick={() => patchVerge({ enable_lite_mode: true })}
/>
<SettingItem
onClick={() => {
exitApp();