mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
chore: update deps & replace deprecated elements
This commit is contained in:
@@ -13,8 +13,8 @@ import {
|
||||
FormControlLabel,
|
||||
Checkbox,
|
||||
Tooltip,
|
||||
Grid,
|
||||
} from "@mui/material";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import { useVerge } from "@/hooks/use-verge";
|
||||
import { useProfiles } from "@/hooks/use-profiles";
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import useSWR from "swr";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useLockFn } from "ahooks";
|
||||
import { Box, Button, IconButton, Stack, Divider, Grid2 } from "@mui/material";
|
||||
import { Box, Button, IconButton, Stack, Divider, Grid } from "@mui/material";
|
||||
import {
|
||||
DndContext,
|
||||
closestCenter,
|
||||
@@ -365,27 +365,29 @@ const ProfilePage = () => {
|
||||
variant="outlined"
|
||||
onChange={(e) => setUrl(e.target.value)}
|
||||
placeholder={t("Profile URL")}
|
||||
InputProps={{
|
||||
sx: { pr: 1 },
|
||||
endAdornment: !url ? (
|
||||
<IconButton
|
||||
size="small"
|
||||
sx={{ p: 0.5 }}
|
||||
title={t("Paste")}
|
||||
onClick={onCopyLink}
|
||||
>
|
||||
<ContentPasteRounded fontSize="inherit" />
|
||||
</IconButton>
|
||||
) : (
|
||||
<IconButton
|
||||
size="small"
|
||||
sx={{ p: 0.5 }}
|
||||
title={t("Clear")}
|
||||
onClick={() => setUrl("")}
|
||||
>
|
||||
<ClearRounded fontSize="inherit" />
|
||||
</IconButton>
|
||||
),
|
||||
slotProps={{
|
||||
input: {
|
||||
sx: { pr: 1 },
|
||||
endAdornment: !url ? (
|
||||
<IconButton
|
||||
size="small"
|
||||
sx={{ p: 0.5 }}
|
||||
title={t("Paste")}
|
||||
onClick={onCopyLink}
|
||||
>
|
||||
<ContentPasteRounded fontSize="inherit" />
|
||||
</IconButton>
|
||||
) : (
|
||||
<IconButton
|
||||
size="small"
|
||||
sx={{ p: 0.5 }}
|
||||
title={t("Clear")}
|
||||
onClick={() => setUrl("")}
|
||||
>
|
||||
<ClearRounded fontSize="inherit" />
|
||||
</IconButton>
|
||||
),
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<LoadingButton
|
||||
@@ -422,14 +424,14 @@ const ProfilePage = () => {
|
||||
}}
|
||||
>
|
||||
<Box sx={{ mb: 1.5 }}>
|
||||
<Grid2 container spacing={{ xs: 1, lg: 1 }}>
|
||||
<Grid container spacing={{ xs: 1, lg: 1 }}>
|
||||
<SortableContext
|
||||
items={profileItems.map((x) => {
|
||||
return x.uid;
|
||||
})}
|
||||
>
|
||||
{profileItems.map((item) => (
|
||||
<Grid2 size={{ xs: 12, sm: 6, md: 4, lg: 3 }} key={item.file}>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 4, lg: 3 }} key={item.file}>
|
||||
<ProfileItem
|
||||
id={item.uid}
|
||||
selected={profiles.current === item.uid}
|
||||
@@ -446,10 +448,10 @@ const ProfilePage = () => {
|
||||
}}
|
||||
onDelete={() => onDelete(item.uid)}
|
||||
/>
|
||||
</Grid2>
|
||||
</Grid>
|
||||
))}
|
||||
</SortableContext>
|
||||
</Grid2>
|
||||
</Grid>
|
||||
</Box>
|
||||
<Divider
|
||||
variant="middle"
|
||||
@@ -457,8 +459,8 @@ const ProfilePage = () => {
|
||||
sx={{ width: `calc(100% - 32px)`, borderColor: dividercolor }}
|
||||
></Divider>
|
||||
<Box sx={{ mt: 1.5, mb: "10px" }}>
|
||||
<Grid2 container spacing={{ xs: 1, lg: 1 }}>
|
||||
<Grid2 size={{ xs: 12, sm: 6, md: 6, lg: 6 }}>
|
||||
<Grid container spacing={{ xs: 1, lg: 1 }}>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 6, lg: 6 }}>
|
||||
<ProfileMore
|
||||
id="Merge"
|
||||
onSave={async (prev, curr) => {
|
||||
@@ -467,8 +469,8 @@ const ProfilePage = () => {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Grid2>
|
||||
<Grid2 size={{ xs: 12, sm: 6, md: 6, lg: 6 }}>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 6, md: 6, lg: 6 }}>
|
||||
<ProfileMore
|
||||
id="Script"
|
||||
logInfo={chainLogs["Script"]}
|
||||
@@ -478,8 +480,8 @@ const ProfilePage = () => {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
</Box>
|
||||
</DndContext>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Box, ButtonGroup, IconButton, Select, MenuItem } from "@mui/material";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import { Box, ButtonGroup, IconButton, Grid } from "@mui/material";
|
||||
import { useLockFn } from "ahooks";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { BasePage } from "@/components/base";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useVerge } from "@/hooks/use-verge";
|
||||
import { Box, Button } from "@mui/material";
|
||||
import Grid2 from "@mui/material/Grid2";
|
||||
import { Box, Button, Grid } from "@mui/material";
|
||||
import {
|
||||
DndContext,
|
||||
closestCenter,
|
||||
@@ -177,14 +176,14 @@ const TestPage = () => {
|
||||
onDragEnd={onDragEnd}
|
||||
>
|
||||
<Box sx={{ mb: 4.5 }}>
|
||||
<Grid2 container spacing={{ xs: 1, lg: 1 }}>
|
||||
<Grid container spacing={{ xs: 1, lg: 1 }}>
|
||||
<SortableContext
|
||||
items={testList.map((x) => {
|
||||
return x.uid;
|
||||
})}
|
||||
>
|
||||
{testList.map((item) => (
|
||||
<Grid2
|
||||
<Grid
|
||||
component={"div"}
|
||||
size={{ xs: 6, lg: 2, sm: 4, md: 3 }}
|
||||
key={item.uid}
|
||||
@@ -195,10 +194,10 @@ const TestPage = () => {
|
||||
onEdit={() => viewerRef.current?.edit(item)}
|
||||
onDelete={onDeleteTestListItem}
|
||||
/>
|
||||
</Grid2>
|
||||
</Grid>
|
||||
))}
|
||||
</SortableContext>
|
||||
</Grid2>
|
||||
</Grid>
|
||||
</Box>
|
||||
</DndContext>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
CircularProgress,
|
||||
alpha,
|
||||
useTheme,
|
||||
Grid,
|
||||
} from "@mui/material";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { BasePage, BaseEmpty } from "@/components/base";
|
||||
|
||||
Reference in New Issue
Block a user