feat: runtime config viewer

This commit is contained in:
GyDi
2022-07-25 01:20:13 +08:00
parent 7633f9f88b
commit a9bf32919e
7 changed files with 119 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ import { SettingList, SettingItem } from "./setting";
import { CmdType } from "../../services/types";
import GuardState from "./guard-state";
import ServiceMode from "./service-mode";
import ConfigViewer from "./config-viewer";
import SysproxyTooltip from "./sysproxy-tooltip";
import getSystem from "../../utils/get-system";
@@ -58,7 +59,14 @@ const SettingSystem = ({ onError }: Props) => {
return (
<SettingList title={t("System Setting")}>
<SettingItem>
<ListItemText primary={t("Tun Mode")} />
<ListItemText
primary={
<Box sx={{ display: "flex", alignItems: "center" }}>
<span style={{ marginRight: 4 }}>{t("Tun Mode")}</span>
<ConfigViewer />
</Box>
}
/>
<GuardState
value={enable_tun_mode ?? false}
valueProps="checked"