chore: disable autocomplete

This commit is contained in:
MystiPanda 2024-07-02 18:55:11 +08:00
parent a2e9523707
commit c424e9dec8
11 changed files with 22 additions and 19 deletions

View File

@ -96,11 +96,11 @@ export const BaseSearchBox = styled((props: SearchProps) => {
return ( return (
<Tooltip title={errorMessage} placement="bottom-start"> <Tooltip title={errorMessage} placement="bottom-start">
<TextField <TextField
autoComplete="off"
inputRef={inputRef} inputRef={inputRef}
hiddenLabel hiddenLabel
fullWidth fullWidth
size="small" size="small"
autoComplete="off"
variant="outlined" variant="outlined"
spellCheck="false" spellCheck="false"
placeholder={props.placeholder ?? t("Filter conditions")} placeholder={props.placeholder ?? t("Filter conditions")}

View File

@ -6,10 +6,10 @@ export const BaseStyledTextField = styled((props: TextFieldProps) => {
return ( return (
<TextField <TextField
autoComplete="off"
hiddenLabel hiddenLabel
fullWidth fullWidth
size="small" size="small"
autoComplete="off"
variant="outlined" variant="outlined"
spellCheck="false" spellCheck="false"
placeholder={t("Filter conditions")} placeholder={t("Filter conditions")}

View File

@ -399,6 +399,7 @@ export const RulesEditorViewer = (props: Props) => {
)} )}
{ruleType.name !== "RULE-SET" && ruleType.name !== "SUB-RULE" && ( {ruleType.name !== "RULE-SET" && ruleType.name !== "SUB-RULE" && (
<TextField <TextField
autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ minWidth: "240px" }}
value={ruleContent} value={ruleContent}

View File

@ -132,6 +132,7 @@ export const ProxyHead = (props: Props) => {
{textState === "filter" && ( {textState === "filter" && (
<TextField <TextField
autoComplete="off"
autoFocus={autoFocus} autoFocus={autoFocus}
hiddenLabel hiddenLabel
value={filterText} value={filterText}
@ -145,10 +146,10 @@ export const ProxyHead = (props: Props) => {
{textState === "url" && ( {textState === "url" && (
<TextField <TextField
autoComplete="off"
autoFocus={autoFocus} autoFocus={autoFocus}
hiddenLabel hiddenLabel
autoSave="off" autoSave="off"
autoComplete="off"
value={testUrl} value={testUrl}
size="small" size="small"
variant="outlined" variant="outlined"

View File

@ -134,8 +134,8 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Mixed Port")} /> <ListItemText primary={t("Mixed Port")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 135 }} sx={{ width: 135 }}
value={mixedPort} value={mixedPort}
onChange={(e) => onChange={(e) =>
@ -146,8 +146,8 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Socks Port")} /> <ListItemText primary={t("Socks Port")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 135 }} sx={{ width: 135 }}
value={socksPort} value={socksPort}
onChange={(e) => onChange={(e) =>
@ -169,8 +169,8 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Http Port")} /> <ListItemText primary={t("Http Port")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 135 }} sx={{ width: 135 }}
value={port} value={port}
onChange={(e) => onChange={(e) =>
@ -193,8 +193,8 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Redir Port")} /> <ListItemText primary={t("Redir Port")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 135 }} sx={{ width: 135 }}
value={redirPort} value={redirPort}
onChange={(e) => onChange={(e) =>
@ -218,8 +218,8 @@ export const ClashPortViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Tproxy Port")} /> <ListItemText primary={t("Tproxy Port")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 135 }} sx={{ width: 135 }}
value={tproxyPort} value={tproxyPort}
onChange={(e) => onChange={(e) =>

View File

@ -48,8 +48,8 @@ export const ControllerViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("External Controller")} /> <ListItemText primary={t("External Controller")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 175 }} sx={{ width: 175 }}
value={controller} value={controller}
placeholder="Required" placeholder="Required"
@ -60,8 +60,8 @@ export const ControllerViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Core Secret")} /> <ListItemText primary={t("Core Secret")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
sx={{ width: 175 }} sx={{ width: 175 }}
value={secret} value={secret}
placeholder={t("Recommended")} placeholder={t("Recommended")}

View File

@ -198,8 +198,8 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
/> />
<TooltipIcon title={t("Default Latency Test Info")} /> <TooltipIcon title={t("Default Latency Test Info")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
autoCorrect="off" autoCorrect="off"
autoCapitalize="off" autoCapitalize="off"
spellCheck="false" spellCheck="false"
@ -215,9 +215,9 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Default Latency Timeout")} /> <ListItemText primary={t("Default Latency Timeout")} />
<TextField <TextField
autoComplete="off"
size="small" size="small"
type="number" type="number"
autoComplete="off"
autoCorrect="off" autoCorrect="off"
autoCapitalize="off" autoCapitalize="off"
spellCheck="false" spellCheck="false"

View File

@ -188,6 +188,7 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Guard Duration")} /> <ListItemText primary={t("Guard Duration")} />
<TextField <TextField
autoComplete="off"
disabled={!enabled} disabled={!enabled}
size="small" size="small"
value={value.duration} value={value.duration}
@ -218,10 +219,10 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
<> <>
<ListItemText primary={t("Proxy Bypass")} /> <ListItemText primary={t("Proxy Bypass")} />
<TextField <TextField
autoComplete="off"
error={value.bypass ? !validReg.test(value.bypass) : false} error={value.bypass ? !validReg.test(value.bypass) : false}
disabled={!enabled} disabled={!enabled}
size="small" size="small"
autoComplete="off"
multiline multiline
rows={4} rows={4}
sx={{ width: "100%" }} sx={{ width: "100%" }}
@ -233,9 +234,9 @@ export const SysproxyViewer = forwardRef<DialogRef>((props, ref) => {
<ListItemText primary={t("Bypass")} /> <ListItemText primary={t("Bypass")} />
<FlexBox> <FlexBox>
<TextField <TextField
autoComplete="off"
disabled={true} disabled={true}
size="small" size="small"
autoComplete="off"
multiline multiline
rows={4} rows={4}
sx={{ width: "100%" }} sx={{ width: "100%" }}

View File

@ -144,8 +144,8 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("Device")} /> <ListItemText primary={t("Device")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
autoCorrect="off" autoCorrect="off"
autoCapitalize="off" autoCapitalize="off"
spellCheck="false" spellCheck="false"
@ -190,8 +190,8 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("DNS Hijack")} /> <ListItemText primary={t("DNS Hijack")} />
<TextField <TextField
size="small"
autoComplete="off" autoComplete="off"
size="small"
autoCorrect="off" autoCorrect="off"
autoCapitalize="off" autoCapitalize="off"
spellCheck="false" spellCheck="false"
@ -207,9 +207,9 @@ export const TunViewer = forwardRef<DialogRef>((props, ref) => {
<ListItem sx={{ padding: "5px 2px" }}> <ListItem sx={{ padding: "5px 2px" }}>
<ListItemText primary={t("MTU")} /> <ListItemText primary={t("MTU")} />
<TextField <TextField
autoComplete="off"
size="small" size="small"
type="number" type="number"
autoComplete="off"
autoCorrect="off" autoCorrect="off"
autoCapitalize="off" autoCapitalize="off"
spellCheck="false" spellCheck="false"

View File

@ -43,12 +43,12 @@ export const WebUIItem = (props: Props) => {
<> <>
<Stack spacing={0.75} direction="row" mt={1} mb={1} alignItems="center"> <Stack spacing={0.75} direction="row" mt={1} mb={1} alignItems="center">
<TextField <TextField
autoComplete="off"
fullWidth fullWidth
size="small" size="small"
value={editValue} value={editValue}
onChange={(e) => setEditValue(e.target.value)} onChange={(e) => setEditValue(e.target.value)}
placeholder={t("Support %host, %port, %secret")} placeholder={t("Support %host, %port, %secret")}
autoComplete="off"
/> />
<IconButton <IconButton
size="small" size="small"

View File

@ -125,8 +125,8 @@ const SettingClash = ({ onError }: Props) => {
} }
> >
<TextField <TextField
disabled={enable_random_port}
autoComplete="off" autoComplete="off"
disabled={enable_random_port}
size="small" size="small"
value={verge_mixed_port ?? 7897} value={verge_mixed_port ?? 7897}
sx={{ width: 100, input: { py: "7.5px", cursor: "pointer" } }} sx={{ width: 100, input: { py: "7.5px", cursor: "pointer" } }}