feat: add UWP loopback tools

This commit is contained in:
Kuingsmile
2023-11-22 00:15:41 -08:00
parent 7ec251ea6d
commit caa82ad1e6
10 changed files with 88 additions and 0 deletions

View File

@@ -18,6 +18,10 @@ import { ClashPortViewer } from "./mods/clash-port-viewer";
import { ControllerViewer } from "./mods/controller-viewer";
import { SettingList, SettingItem } from "./mods/setting-comp";
import { ClashCoreViewer } from "./mods/clash-core-viewer";
import { invoke_uwp_tool } from "@/services/cmds";
import getSystem from "@/utils/get-system";
const isWIN = getSystem() === "windows";
interface Props {
onError: (err: Error) => void;
@@ -162,6 +166,19 @@ const SettingClash = ({ onError }: Props) => {
>
<Typography sx={{ py: "7px", pr: 1 }}>{version}</Typography>
</SettingItem>
{isWIN && (
<SettingItem label={t("Open UWP tool")}>
<IconButton
color="inherit"
size="small"
sx={{ my: "2px" }}
onClick={invoke_uwp_tool}
>
<ArrowForward />
</IconButton>
</SettingItem>
)}
</SettingList>
);
};