diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index e4f5bf73..e31b5137 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -35,6 +35,9 @@ body { border-radius: 6px; background-color: var(--scroller-color); } +*::-webkit-scrollbar-corner { + background-color: transparent; +} body { overflow: hidden; diff --git a/src/components/connection/connection-item.tsx b/src/components/connection/connection-item.tsx index 3c7d664c..5924800a 100644 --- a/src/components/connection/connection-item.tsx +++ b/src/components/connection/connection-item.tsx @@ -38,6 +38,7 @@ export const ConnectionItem = (props: Props) => { return ( diff --git a/src/components/proxy/proxy-groups.tsx b/src/components/proxy/proxy-groups.tsx index 2db4d7b5..e53e01df 100644 --- a/src/components/proxy/proxy-groups.tsx +++ b/src/components/proxy/proxy-groups.tsx @@ -7,6 +7,7 @@ import { updateProxy, deleteConnection, } from "@/services/api"; +import { Box } from "@mui/material"; import { useProfiles } from "@/hooks/use-profiles"; import { useVerge } from "@/hooks/use-verge"; import { BaseEmpty } from "../base"; @@ -117,7 +118,7 @@ export const ProxyGroups = (props: Props) => { return ( ( diff --git a/src/components/rule/rule-item.tsx b/src/components/rule/rule-item.tsx index 3bf2291d..cec623e0 100644 --- a/src/components/rule/rule-item.tsx +++ b/src/components/rule/rule-item.tsx @@ -34,7 +34,7 @@ const RuleItem = (props: Props) => { const { index, value } = props; return ( - + IConnectionsItem[]; const ConnectionsPage = () => { const { t, i18n } = useTranslation(); const { clashInfo } = useClashInfo(); - + const { theme } = useCustomTheme(); + const isDark = theme.palette.mode === "dark"; const [filterText, setFilterText] = useState(""); const [curOrderOpt, setOrderOpt] = useState("Default"); const [connData, setConnData] = useState(initConn); @@ -106,7 +108,6 @@ const ConnectionsPage = () => { useEffect(() => { if (!clashInfo) return; - const { server = "", secret = "" } = clashInfo; connect(`ws://${server}/connections?token=${encodeURIComponent(secret)}`); @@ -198,7 +199,15 @@ const ConnectionsPage = () => { /> - + {filterConn.length === 0 ? ( ) : isTableLayout ? ( diff --git a/src/pages/logs.tsx b/src/pages/logs.tsx index 150f4a60..508be058 100644 --- a/src/pages/logs.tsx +++ b/src/pages/logs.tsx @@ -18,12 +18,14 @@ import { import { atomEnableLog, atomLogData } from "@/services/states"; import { BaseEmpty, BasePage } from "@/components/base"; import LogItem from "@/components/log/log-item"; +import { useCustomTheme } from "@/components/layout/use-custom-theme"; const LogPage = () => { const { t } = useTranslation(); const [logData, setLogData] = useRecoilState(atomLogData); const [enableLog, setEnableLog] = useRecoilState(atomEnableLog); - + const { theme } = useCustomTheme(); + const isDark = theme.palette.mode === "dark"; const [logState, setLogState] = useState("all"); const [filterText, setFilterText] = useState(""); @@ -107,7 +109,14 @@ const LogPage = () => { /> - + {filterLogs.length > 0 ? ( { return ( { } > - + { {t("New")} - - - - { - return x.uid; - })} - > - {regularItems.map((item) => ( - - onSelect(item.uid, f)} - onEdit={() => viewerRef.current?.edit(item)} - /> - - ))} - - - - - - {enhanceItems.length > 0 && ( - - {enhanceItems.map((item) => ( - - onEnable(item.uid)} - onDisable={() => onDisable(item.uid)} - onDelete={() => onDelete(item.uid)} - onMoveTop={() => onMoveTop(item.uid)} - onMoveEnd={() => onMoveEnd(item.uid)} - onEdit={() => viewerRef.current?.edit(item)} - /> + + + + { + return x.uid; + })} + > + {regularItems.map((item) => ( + + onSelect(item.uid, f)} + onEdit={() => viewerRef.current?.edit(item)} + /> + + ))} + - ))} - - )} + + + + {enhanceItems.length > 0 && ( + + {enhanceItems.map((item) => ( + + onEnable(item.uid)} + onDisable={() => onDisable(item.uid)} + onDelete={() => onDelete(item.uid)} + onMoveTop={() => onMoveTop(item.uid)} + onMoveEnd={() => onMoveEnd(item.uid)} + onEdit={() => viewerRef.current?.edit(item)} + /> + + ))} + + )} + mutateProfiles()} /> diff --git a/src/pages/rules.tsx b/src/pages/rules.tsx index e197e69e..a4870015 100644 --- a/src/pages/rules.tsx +++ b/src/pages/rules.tsx @@ -7,11 +7,13 @@ import { getRules } from "@/services/api"; import { BaseEmpty, BasePage } from "@/components/base"; import RuleItem from "@/components/rule/rule-item"; import { ProviderButton } from "@/components/rule/provider-button"; +import { useCustomTheme } from "@/components/layout/use-custom-theme"; const RulesPage = () => { const { t } = useTranslation(); const { data = [] } = useSWR("getRules", getRules); - + const { theme } = useCustomTheme(); + const isDark = theme.palette.mode === "dark"; const [filterText, setFilterText] = useState(""); const rules = useMemo(() => { @@ -53,7 +55,14 @@ const RulesPage = () => { /> - + {rules.length > 0 ? ( { return ( @@ -131,32 +132,40 @@ const TestPage = () => { } > - - - - { - return x.uid; - })} - > - {testList.map((item) => ( - - viewerRef.current?.edit(item)} - onDelete={onDeleteTestListItem} - /> - - ))} - - - - + + + + { + return x.uid; + })} + > + {testList.map((item) => ( + + viewerRef.current?.edit(item)} + onDelete={onDeleteTestListItem} + /> + + ))} + + + + + );