mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-06 03:03:44 +08:00
style: fix styles
This commit is contained in:
parent
a7ff806522
commit
564bd55147
@ -35,6 +35,9 @@ body {
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background-color: var(--scroller-color);
|
background-color: var(--scroller-color);
|
||||||
}
|
}
|
||||||
|
*::-webkit-scrollbar-corner {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -38,6 +38,7 @@ export const ConnectionItem = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<ListItem
|
<ListItem
|
||||||
dense
|
dense
|
||||||
|
sx={{ borderBottom: "1px solid var(--divider-color)" }}
|
||||||
secondaryAction={
|
secondaryAction={
|
||||||
<IconButton edge="end" color="inherit" onClick={onDelete}>
|
<IconButton edge="end" color="inherit" onClick={onDelete}>
|
||||||
<CloseRounded />
|
<CloseRounded />
|
||||||
|
@ -7,6 +7,7 @@ import {
|
|||||||
updateProxy,
|
updateProxy,
|
||||||
deleteConnection,
|
deleteConnection,
|
||||||
} from "@/services/api";
|
} from "@/services/api";
|
||||||
|
import { Box } from "@mui/material";
|
||||||
import { useProfiles } from "@/hooks/use-profiles";
|
import { useProfiles } from "@/hooks/use-profiles";
|
||||||
import { useVerge } from "@/hooks/use-verge";
|
import { useVerge } from "@/hooks/use-verge";
|
||||||
import { BaseEmpty } from "../base";
|
import { BaseEmpty } from "../base";
|
||||||
@ -117,7 +118,7 @@ export const ProxyGroups = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
ref={virtuosoRef}
|
ref={virtuosoRef}
|
||||||
style={{ height: "100%" }}
|
style={{ height: "calc(100% - 12px)" }}
|
||||||
totalCount={renderList.length}
|
totalCount={renderList.length}
|
||||||
increaseViewportBy={256}
|
increaseViewportBy={256}
|
||||||
itemContent={(index) => (
|
itemContent={(index) => (
|
||||||
|
@ -34,7 +34,7 @@ const RuleItem = (props: Props) => {
|
|||||||
const { index, value } = props;
|
const { index, value } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Item>
|
<Item sx={{ borderBottom: "1px solid var(--divider-color)" }}>
|
||||||
<Typography
|
<Typography
|
||||||
color="text.secondary"
|
color="text.secondary"
|
||||||
variant="body2"
|
variant="body2"
|
||||||
|
@ -25,6 +25,7 @@ import {
|
|||||||
ConnectionDetailRef,
|
ConnectionDetailRef,
|
||||||
} from "@/components/connection/connection-detail";
|
} from "@/components/connection/connection-detail";
|
||||||
import parseTraffic from "@/utils/parse-traffic";
|
import parseTraffic from "@/utils/parse-traffic";
|
||||||
|
import { useCustomTheme } from "@/components/layout/use-custom-theme";
|
||||||
|
|
||||||
const initConn = { uploadTotal: 0, downloadTotal: 0, connections: [] };
|
const initConn = { uploadTotal: 0, downloadTotal: 0, connections: [] };
|
||||||
|
|
||||||
@ -33,7 +34,8 @@ type OrderFunc = (list: IConnectionsItem[]) => IConnectionsItem[];
|
|||||||
const ConnectionsPage = () => {
|
const ConnectionsPage = () => {
|
||||||
const { t, i18n } = useTranslation();
|
const { t, i18n } = useTranslation();
|
||||||
const { clashInfo } = useClashInfo();
|
const { clashInfo } = useClashInfo();
|
||||||
|
const { theme } = useCustomTheme();
|
||||||
|
const isDark = theme.palette.mode === "dark";
|
||||||
const [filterText, setFilterText] = useState("");
|
const [filterText, setFilterText] = useState("");
|
||||||
const [curOrderOpt, setOrderOpt] = useState("Default");
|
const [curOrderOpt, setOrderOpt] = useState("Default");
|
||||||
const [connData, setConnData] = useState<IConnections>(initConn);
|
const [connData, setConnData] = useState<IConnections>(initConn);
|
||||||
@ -106,7 +108,6 @@ const ConnectionsPage = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!clashInfo) return;
|
if (!clashInfo) return;
|
||||||
|
|
||||||
const { server = "", secret = "" } = clashInfo;
|
const { server = "", secret = "" } = clashInfo;
|
||||||
connect(`ws://${server}/connections?token=${encodeURIComponent(secret)}`);
|
connect(`ws://${server}/connections?token=${encodeURIComponent(secret)}`);
|
||||||
|
|
||||||
@ -198,7 +199,15 @@ const ConnectionsPage = () => {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box height="calc(100% - 50px)" sx={{ userSelect: "text" }}>
|
<Box
|
||||||
|
height="calc(100% - 70px)"
|
||||||
|
sx={{
|
||||||
|
userSelect: "text",
|
||||||
|
margin: "12px",
|
||||||
|
borderRadius: "8px",
|
||||||
|
bgcolor: isDark ? "#282a36" : "#ffffff",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{filterConn.length === 0 ? (
|
{filterConn.length === 0 ? (
|
||||||
<BaseEmpty text="No Connections" />
|
<BaseEmpty text="No Connections" />
|
||||||
) : isTableLayout ? (
|
) : isTableLayout ? (
|
||||||
|
@ -18,12 +18,14 @@ import {
|
|||||||
import { atomEnableLog, atomLogData } from "@/services/states";
|
import { atomEnableLog, atomLogData } from "@/services/states";
|
||||||
import { BaseEmpty, BasePage } from "@/components/base";
|
import { BaseEmpty, BasePage } from "@/components/base";
|
||||||
import LogItem from "@/components/log/log-item";
|
import LogItem from "@/components/log/log-item";
|
||||||
|
import { useCustomTheme } from "@/components/layout/use-custom-theme";
|
||||||
|
|
||||||
const LogPage = () => {
|
const LogPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [logData, setLogData] = useRecoilState(atomLogData);
|
const [logData, setLogData] = useRecoilState(atomLogData);
|
||||||
const [enableLog, setEnableLog] = useRecoilState(atomEnableLog);
|
const [enableLog, setEnableLog] = useRecoilState(atomEnableLog);
|
||||||
|
const { theme } = useCustomTheme();
|
||||||
|
const isDark = theme.palette.mode === "dark";
|
||||||
const [logState, setLogState] = useState("all");
|
const [logState, setLogState] = useState("all");
|
||||||
const [filterText, setFilterText] = useState("");
|
const [filterText, setFilterText] = useState("");
|
||||||
|
|
||||||
@ -107,7 +109,14 @@ const LogPage = () => {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box height="calc(100% - 50px)">
|
<Box
|
||||||
|
height="calc(100% - 70px)"
|
||||||
|
sx={{
|
||||||
|
margin: "12px",
|
||||||
|
borderRadius: "8px",
|
||||||
|
bgcolor: isDark ? "#282a36" : "#ffffff",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{filterLogs.length > 0 ? (
|
{filterLogs.length > 0 ? (
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
initialTopMostItemIndex={999}
|
initialTopMostItemIndex={999}
|
||||||
|
@ -238,7 +238,9 @@ const ProfilePage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<BasePage
|
<BasePage
|
||||||
|
full
|
||||||
title={t("Profiles")}
|
title={t("Profiles")}
|
||||||
|
contentStyle={{ height: "100%" }}
|
||||||
header={
|
header={
|
||||||
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
||||||
<IconButton
|
<IconButton
|
||||||
@ -270,7 +272,18 @@ const ProfilePage = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Stack direction="row" spacing={1} sx={{ mb: 2 }}>
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
spacing={1}
|
||||||
|
sx={{
|
||||||
|
pt: 1,
|
||||||
|
mb: 0.5,
|
||||||
|
mx: "10px",
|
||||||
|
height: "36px",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<TextField
|
<TextField
|
||||||
hiddenLabel
|
hiddenLabel
|
||||||
fullWidth
|
fullWidth
|
||||||
@ -322,6 +335,16 @@ const ProfilePage = () => {
|
|||||||
{t("New")}
|
{t("New")}
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
pt: 1,
|
||||||
|
mb: 0.5,
|
||||||
|
pl: "10px",
|
||||||
|
mr: "10px",
|
||||||
|
height: "calc(100% - 20px)",
|
||||||
|
overflowY: "auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<DndContext
|
<DndContext
|
||||||
sensors={sensors}
|
sensors={sensors}
|
||||||
collisionDetection={closestCenter}
|
collisionDetection={closestCenter}
|
||||||
@ -371,6 +394,7 @@ const ProfilePage = () => {
|
|||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
)}
|
||||||
|
</Box>
|
||||||
<ProfileViewer ref={viewerRef} onChange={() => mutateProfiles()} />
|
<ProfileViewer ref={viewerRef} onChange={() => mutateProfiles()} />
|
||||||
<ConfigViewer ref={configRef} />
|
<ConfigViewer ref={configRef} />
|
||||||
</BasePage>
|
</BasePage>
|
||||||
|
@ -7,11 +7,13 @@ import { getRules } from "@/services/api";
|
|||||||
import { BaseEmpty, BasePage } from "@/components/base";
|
import { BaseEmpty, BasePage } from "@/components/base";
|
||||||
import RuleItem from "@/components/rule/rule-item";
|
import RuleItem from "@/components/rule/rule-item";
|
||||||
import { ProviderButton } from "@/components/rule/provider-button";
|
import { ProviderButton } from "@/components/rule/provider-button";
|
||||||
|
import { useCustomTheme } from "@/components/layout/use-custom-theme";
|
||||||
|
|
||||||
const RulesPage = () => {
|
const RulesPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { data = [] } = useSWR("getRules", getRules);
|
const { data = [] } = useSWR("getRules", getRules);
|
||||||
|
const { theme } = useCustomTheme();
|
||||||
|
const isDark = theme.palette.mode === "dark";
|
||||||
const [filterText, setFilterText] = useState("");
|
const [filterText, setFilterText] = useState("");
|
||||||
|
|
||||||
const rules = useMemo(() => {
|
const rules = useMemo(() => {
|
||||||
@ -53,7 +55,14 @@ const RulesPage = () => {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box height="calc(100% - 50px)">
|
<Box
|
||||||
|
height="calc(100% - 70px)"
|
||||||
|
sx={{
|
||||||
|
margin: "12px",
|
||||||
|
borderRadius: "8px",
|
||||||
|
bgcolor: isDark ? "#282a36" : "#ffffff",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{rules.length > 0 ? (
|
{rules.length > 0 ? (
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
data={rules}
|
data={rules}
|
||||||
|
@ -111,6 +111,7 @@ const TestPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<BasePage
|
<BasePage
|
||||||
|
full
|
||||||
title={t("Test")}
|
title={t("Test")}
|
||||||
header={
|
header={
|
||||||
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
||||||
@ -130,6 +131,13 @@ const TestPage = () => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
pt: 1,
|
||||||
|
mb: 0.5,
|
||||||
|
px: "10px",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<DndContext
|
<DndContext
|
||||||
sensors={sensors}
|
sensors={sensors}
|
||||||
@ -157,6 +165,7 @@ const TestPage = () => {
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Box>
|
</Box>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
|
</Box>
|
||||||
<TestViewer ref={viewerRef} onChange={onTestListItemChange} />
|
<TestViewer ref={viewerRef} onChange={onTestListItemChange} />
|
||||||
</BasePage>
|
</BasePage>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user