mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:23:44 +08:00
chore: replace mui grid with mui grid2
This commit is contained in:
parent
18a0a15e16
commit
87c4ebe0da
@ -1,7 +1,7 @@
|
|||||||
import useSWR, { mutate } from "swr";
|
import useSWR, { mutate } from "swr";
|
||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { Box, Button, Grid, IconButton, Stack, Divider } from "@mui/material";
|
import { Box, Button, IconButton, Stack, Divider, Grid2 } from "@mui/material";
|
||||||
import {
|
import {
|
||||||
DndContext,
|
DndContext,
|
||||||
closestCenter,
|
closestCenter,
|
||||||
@ -372,14 +372,14 @@ const ProfilePage = () => {
|
|||||||
onDragEnd={onDragEnd}
|
onDragEnd={onDragEnd}
|
||||||
>
|
>
|
||||||
<Box sx={{ mb: 1.5 }}>
|
<Box sx={{ mb: 1.5 }}>
|
||||||
<Grid container spacing={{ xs: 1, lg: 1 }}>
|
<Grid2 container spacing={{ xs: 1, lg: 1 }}>
|
||||||
<SortableContext
|
<SortableContext
|
||||||
items={profileItems.map((x) => {
|
items={profileItems.map((x) => {
|
||||||
return x.uid;
|
return x.uid;
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{profileItems.map((item) => (
|
{profileItems.map((item) => (
|
||||||
<Grid item xs={12} sm={6} md={4} lg={3} key={item.file}>
|
<Grid2 size={{ xs: 12, sm: 6, md: 4, lg: 3 }} key={item.file}>
|
||||||
<ProfileItem
|
<ProfileItem
|
||||||
id={item.uid}
|
id={item.uid}
|
||||||
selected={profiles.current === item.uid}
|
selected={profiles.current === item.uid}
|
||||||
@ -394,10 +394,10 @@ const ProfilePage = () => {
|
|||||||
}}
|
}}
|
||||||
onDelete={() => onDelete(item.uid)}
|
onDelete={() => onDelete(item.uid)}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid2>
|
||||||
))}
|
))}
|
||||||
</SortableContext>
|
</SortableContext>
|
||||||
</Grid>
|
</Grid2>
|
||||||
</Box>
|
</Box>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
<Divider
|
<Divider
|
||||||
@ -406,8 +406,8 @@ const ProfilePage = () => {
|
|||||||
sx={{ width: `calc(100% - 32px)`, borderColor: dividercolor }}
|
sx={{ width: `calc(100% - 32px)`, borderColor: dividercolor }}
|
||||||
></Divider>
|
></Divider>
|
||||||
<Box sx={{ mt: 1.5 }}>
|
<Box sx={{ mt: 1.5 }}>
|
||||||
<Grid container spacing={{ xs: 1, lg: 1 }}>
|
<Grid2 container spacing={{ xs: 1, lg: 1 }}>
|
||||||
<Grid item xs={12} sm={6} md={6} lg={6}>
|
<Grid2 size={{ xs: 12, sm: 6, md: 6, lg: 6 }}>
|
||||||
<ProfileMore
|
<ProfileMore
|
||||||
id="Merge"
|
id="Merge"
|
||||||
onSave={async (prev, curr) => {
|
onSave={async (prev, curr) => {
|
||||||
@ -416,8 +416,8 @@ const ProfilePage = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid2>
|
||||||
<Grid item xs={12} sm={6} md={6} lg={6}>
|
<Grid2 size={{ xs: 12, sm: 6, md: 6, lg: 6 }}>
|
||||||
<ProfileMore
|
<ProfileMore
|
||||||
id="Script"
|
id="Script"
|
||||||
logInfo={chainLogs["Script"]}
|
logInfo={chainLogs["Script"]}
|
||||||
@ -427,8 +427,8 @@ const ProfilePage = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid2>
|
||||||
</Grid>
|
</Grid2>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user