mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:02:22 +08:00
feat: refactor and adjust ui
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Box, Paper, Typography } from "@mui/material";
|
||||
import { Paper } from "@mui/material";
|
||||
import { Virtuoso } from "react-virtuoso";
|
||||
import { getInfomation } from "../services/api";
|
||||
import { ApiType } from "../services/types";
|
||||
import { getInfomation } from "../services/api";
|
||||
import BasePage from "../components/base-page";
|
||||
import ConnectionItem from "../components/connection-item";
|
||||
|
||||
const ConnectionsPage = () => {
|
||||
@@ -26,25 +27,14 @@ const ConnectionsPage = () => {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
width: 0.9,
|
||||
maxWidth: "850px",
|
||||
height: "100%",
|
||||
mx: "auto",
|
||||
}}
|
||||
>
|
||||
<Typography variant="h4" component="h1" sx={{ py: 2 }}>
|
||||
Connections
|
||||
</Typography>
|
||||
|
||||
<Paper sx={{ boxShadow: 2, height: "calc(100% - 100px)" }}>
|
||||
<BasePage title="Connections" contentStyle={{ height: "100%" }}>
|
||||
<Paper sx={{ boxShadow: 2, height: "100%" }}>
|
||||
<Virtuoso
|
||||
data={conn.connections}
|
||||
itemContent={(index, item) => <ConnectionItem value={item} />}
|
||||
/>
|
||||
</Paper>
|
||||
</Box>
|
||||
</BasePage>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user