feat: add animation
This commit is contained in:
parent
4649454282
commit
eb28ec866a
@ -4,6 +4,7 @@ import { useLockFn, useSetState } from "ahooks";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Collapse,
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogActions,
|
DialogActions,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
@ -121,18 +122,7 @@ const InfoEditor = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{showOpt && (
|
{(type === "remote" || type === "local") && (
|
||||||
<TextField
|
|
||||||
{...textFieldProps}
|
|
||||||
label="User Agent"
|
|
||||||
value={option.user_agent}
|
|
||||||
placeholder={`clash-verge/v${version}`}
|
|
||||||
onChange={(e) => setOption({ user_agent: e.target.value })}
|
|
||||||
onKeyDown={(e) => e.key === "Enter" && onUpdate()}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{((type === "remote" && showOpt) || type === "local") && (
|
|
||||||
<TextField
|
<TextField
|
||||||
{...textFieldProps}
|
{...textFieldProps}
|
||||||
label={t("Update Interval(mins)")}
|
label={t("Update Interval(mins)")}
|
||||||
@ -145,7 +135,20 @@ const InfoEditor = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{form.type === "remote" && showOpt && (
|
<Collapse
|
||||||
|
in={type === "remote" && showOpt}
|
||||||
|
timeout="auto"
|
||||||
|
unmountOnExit
|
||||||
|
>
|
||||||
|
<TextField
|
||||||
|
{...textFieldProps}
|
||||||
|
label="User Agent"
|
||||||
|
value={option.user_agent}
|
||||||
|
placeholder={`clash-verge/v${version}`}
|
||||||
|
onChange={(e) => setOption({ user_agent: e.target.value })}
|
||||||
|
onKeyDown={(e) => e.key === "Enter" && onUpdate()}
|
||||||
|
/>
|
||||||
|
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
label={t("Use System Proxy")}
|
label={t("Use System Proxy")}
|
||||||
labelPlacement="start"
|
labelPlacement="start"
|
||||||
@ -163,9 +166,7 @@ const InfoEditor = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
|
|
||||||
{form.type === "remote" && showOpt && (
|
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
label={t("Use Clash Proxy")}
|
label={t("Use Clash Proxy")}
|
||||||
labelPlacement="start"
|
labelPlacement="start"
|
||||||
@ -183,7 +184,7 @@ const InfoEditor = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
</Collapse>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
||||||
<DialogActions sx={{ px: 2, pb: 2, position: "relative" }}>
|
<DialogActions sx={{ px: 2, pb: 2, position: "relative" }}>
|
||||||
|
Loading…
Reference in New Issue
Block a user