diff --git a/src/components/setting/mods/sysproxy-viewer.tsx b/src/components/setting/mods/sysproxy-viewer.tsx index 19e2de3..56ae77f 100644 --- a/src/components/setting/mods/sysproxy-viewer.tsx +++ b/src/components/setting/mods/sysproxy-viewer.tsx @@ -1,6 +1,8 @@ import { forwardRef, useImperativeHandle, useState } from "react"; import { useLockFn } from "ahooks"; import { useTranslation } from "react-i18next"; +import { IconButton, Tooltip } from "@mui/material"; +import { InfoRounded } from "@mui/icons-material"; import { Box, InputAdornment, @@ -103,7 +105,7 @@ export const SysproxyViewer = forwardRef((props, ref) => { setOpen(false)} @@ -111,6 +113,39 @@ export const SysproxyViewer = forwardRef((props, ref) => { onOk={onSave} > + + + {t("Current System Proxy")} + + + {t("Enable status")} + + {value.pac + ? autoproxy?.enable + ? t("Enabled") + : t("Disabled") + : sysproxy?.enable + ? t("Enabled") + : t("Disabled")} + + + {!value.pac && ( + <> + + {t("Server Addr")} + + {sysproxy?.server ? sysproxy.server : t("Not available")} + + + + )} + ((props, ref) => { onChange={(_, e) => setValue((v) => ({ ...v, pac: e }))} /> + + + + + + ((props, ref) => { }} /> + {!value.pac && ( <> - - - - + + {t("Proxy Bypass")} + + ((props, ref) => { setValue((v) => ({ ...v, bypass: e.target.value })) } /> - + + + {t("Bypass")} + + + + )} + {value.pac && ( <> @@ -209,53 +266,14 @@ export const SysproxyViewer = forwardRef((props, ref) => { )} - - - - {t("Current System Proxy")} - - - - {t("Enable status")} - - {value.pac - ? (!!autoproxy?.enable).toString() - : (!!sysproxy?.enable).toString()} - - - {!value.pac && ( - <> - - {t("Server Addr")} - - {sysproxy?.server || "-"} - - - - - {t("Bypass")} - - - - - - )} {value.pac && ( {t("PAC URL")} {autoproxy?.url || "-"} )} - + ); }); @@ -266,6 +284,6 @@ const FlexBox = styled("div")` .label { flex: none; - width: 85px; + //width: 85px; } `; diff --git a/src/components/setting/mods/theme-viewer.tsx b/src/components/setting/mods/theme-viewer.tsx index 5828e1e..c6ac7d4 100644 --- a/src/components/setting/mods/theme-viewer.tsx +++ b/src/components/setting/mods/theme-viewer.tsx @@ -81,7 +81,7 @@ export const ThemeViewer = forwardRef((props, ref) => { title={t("Theme Setting")} okBtn={t("Save")} cancelBtn={t("Cancel")} - contentSx={{ width: 400, maxHeight: 300, overflow: "auto", pb: 0 }} + contentSx={{ width: 400, maxHeight: 505, overflow: "auto", pb: 0 }} onClose={() => setOpen(false)} onCancel={() => setOpen(false)} onOk={onSave} diff --git a/src/components/setting/setting-system.tsx b/src/components/setting/setting-system.tsx index a742d42..5cba3f6 100644 --- a/src/components/setting/setting-system.tsx +++ b/src/components/setting/setting-system.tsx @@ -123,16 +123,26 @@ const SettingSystem = ({ onError }: Props) => { sysproxyRef.current?.open()} - > - - + <> + + + + + + sysproxyRef.current?.open()} + > + + + } >