feat: Add exit button on setting page

This commit is contained in:
MystiPanda 2024-01-18 22:19:14 +08:00
parent 1d91e1f1f7
commit 82d7baee0b
5 changed files with 29 additions and 13 deletions

View File

@ -11,6 +11,8 @@
- 连接页面时间排序错误
- 连接页面表格宽度优化
---
## v1.4.8
### Features

View File

@ -13,6 +13,7 @@ import {
import { openAppDir, openCoreDir, openLogsDir } from "@/services/cmds";
import { ArrowForward } from "@mui/icons-material";
import { checkUpdate } from "@tauri-apps/api/updater";
import { exit } from "@tauri-apps/api/process";
import { useVerge } from "@/hooks/use-verge";
import { version } from "@root/package.json";
import { DialogRef, Notice } from "@/components/base";
@ -26,7 +27,6 @@ import { GuardState } from "./mods/guard-state";
import { LayoutViewer } from "./mods/layout-viewer";
import { UpdateViewer } from "./mods/update-viewer";
import getSystem from "@/utils/get-system";
import { portableFlag } from "@/pages/_layout";
import { routers } from "@/pages/_routers";
interface Props {
onError?: (err: Error) => void;
@ -293,7 +293,6 @@ const SettingVerge = ({ onError }: Props) => {
</IconButton>
</SettingItem>
{!portableFlag && (
<SettingItem label={t("Check for Updates")}>
<IconButton
color="inherit"
@ -304,7 +303,19 @@ const SettingVerge = ({ onError }: Props) => {
<ArrowForward />
</IconButton>
</SettingItem>
)}
<SettingItem label={t("Exit")}>
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={() => {
exit(0);
}}
>
<ArrowForward />
</IconButton>
</SettingItem>
<SettingItem label={t("Verge Version")}>
<Typography sx={{ py: "7px", pr: 1 }}>v{version}</Typography>

View File

@ -129,6 +129,7 @@
"Back": "Back",
"Save": "Save",
"Cancel": "Cancel",
"Exit": "Exit",
"Default": "Default",
"Download Speed": "Download Speed",

View File

@ -117,6 +117,7 @@
"Back": "Назад",
"Save": "Сохранить",
"Cancel": "Отмена",
"Exit": "Выход",
"open_dashboard": "Open Dashboard",
"clash_mode_rule": "Режим правил",

View File

@ -129,6 +129,7 @@
"Back": "返回",
"Save": "保存",
"Cancel": "取消",
"Exit": "退出",
"Default": "默认",
"Download Speed": "下载速度",