chore: update deps & replace deprecated elements
This commit is contained in:
@@ -7,8 +7,7 @@ import { useLockFn } from "ahooks";
|
||||
import {
|
||||
TextField,
|
||||
Button,
|
||||
Grid2,
|
||||
Box,
|
||||
Grid,
|
||||
Stack,
|
||||
IconButton,
|
||||
InputAdornment,
|
||||
@@ -138,10 +137,10 @@ export const BackupConfigViewer = memo(
|
||||
|
||||
return (
|
||||
<form onSubmit={(e) => e.preventDefault()}>
|
||||
<Grid2 container spacing={2}>
|
||||
<Grid2 size={{ xs: 12, sm: 9 }}>
|
||||
<Grid2 container spacing={2}>
|
||||
<Grid2 size={{ xs: 12 }}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid size={{ xs: 12, sm: 9 }}>
|
||||
<Grid container spacing={2}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
label={t("WebDAV Server URL")}
|
||||
@@ -153,8 +152,8 @@ export const BackupConfigViewer = memo(
|
||||
spellCheck="false"
|
||||
inputRef={urlRef}
|
||||
/>
|
||||
</Grid2>
|
||||
<Grid2 size={{ xs: 6 }}>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 6 }}>
|
||||
<TextField
|
||||
label={t("Username")}
|
||||
variant="outlined"
|
||||
@@ -165,8 +164,8 @@ export const BackupConfigViewer = memo(
|
||||
spellCheck="false"
|
||||
inputRef={usernameRef}
|
||||
/>
|
||||
</Grid2>
|
||||
<Grid2 size={{ xs: 6 }}>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 6 }}>
|
||||
<TextField
|
||||
label={t("Password")}
|
||||
type={showPassword ? "text" : "password"}
|
||||
@@ -192,10 +191,10 @@ export const BackupConfigViewer = memo(
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
<Grid2 size={{ xs: 12, sm: 3 }}>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, sm: 3 }}>
|
||||
<Stack
|
||||
direction="column"
|
||||
justifyContent="space-between"
|
||||
@@ -237,8 +236,8 @@ export const BackupConfigViewer = memo(
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
</Grid2>
|
||||
</Grid2>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</form>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -186,16 +186,18 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
onChange={(e) =>
|
||||
setSocksPort(+e.target.value?.replace(/\D+/, "").slice(0, 5))
|
||||
}
|
||||
InputProps={{
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={socksEnabled}
|
||||
onChange={(_, c) => {
|
||||
setSocksEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
slotProps={{
|
||||
input: {
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={socksEnabled}
|
||||
onChange={(_, c) => {
|
||||
setSocksEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
@@ -209,16 +211,18 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
onChange={(e) =>
|
||||
setPort(+e.target.value?.replace(/\D+/, "").slice(0, 5))
|
||||
}
|
||||
InputProps={{
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={httpEnabled}
|
||||
onChange={(_, c) => {
|
||||
setHttpEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
slotProps={{
|
||||
input: {
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={httpEnabled}
|
||||
onChange={(_, c) => {
|
||||
setHttpEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
@@ -233,16 +237,18 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
onChange={(e) =>
|
||||
setRedirPort(+e.target.value?.replace(/\D+/, "").slice(0, 5))
|
||||
}
|
||||
InputProps={{
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={redirEnabled}
|
||||
onChange={(_, c) => {
|
||||
setRedirEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
slotProps={{
|
||||
input: {
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={redirEnabled}
|
||||
onChange={(_, c) => {
|
||||
setRedirEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
@@ -258,16 +264,18 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
onChange={(e) =>
|
||||
setTproxyPort(+e.target.value?.replace(/\D+/, "").slice(0, 5))
|
||||
}
|
||||
InputProps={{
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={tproxyEnabled}
|
||||
onChange={(_, c) => {
|
||||
setTproxyEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
slotProps={{
|
||||
input: {
|
||||
sx: { pr: 1 },
|
||||
endAdornment: (
|
||||
<Switch
|
||||
checked={tproxyEnabled}
|
||||
onChange={(_, c) => {
|
||||
setTproxyEnabled(c);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
|
||||
@@ -240,10 +240,12 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
defaultLatencyTimeout: parseInt(e.target.value),
|
||||
}))
|
||||
}
|
||||
InputProps={{
|
||||
endAdornment: (
|
||||
<InputAdornment position="end">{t("millis")}</InputAdornment>
|
||||
),
|
||||
slotProps={{
|
||||
input: {
|
||||
endAdornment: (
|
||||
<InputAdornment position="end">{t("millis")}</InputAdornment>
|
||||
),
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
|
||||
@@ -412,8 +412,10 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
size="small"
|
||||
value={value.duration}
|
||||
sx={{ width: 100 }}
|
||||
InputProps={{
|
||||
endAdornment: <InputAdornment position="end">s</InputAdornment>,
|
||||
slotProps={{
|
||||
input: {
|
||||
endAdornment: <InputAdornment position="end">s</InputAdornment>,
|
||||
}
|
||||
}}
|
||||
onChange={(e) => {
|
||||
setValue((v) => ({
|
||||
|
||||
Reference in New Issue
Block a user