mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Chore: disable change port on clashx
This commit is contained in:
parent
3acae645af
commit
f730bc7380
@ -10,6 +10,7 @@ interface InputProps extends BaseComponentProps {
|
|||||||
inside?: boolean
|
inside?: boolean
|
||||||
autoFocus?: boolean
|
autoFocus?: boolean
|
||||||
type?: string
|
type?: string
|
||||||
|
disabled?: boolean
|
||||||
onChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void
|
onChange?: (value: string, event?: React.ChangeEvent<HTMLInputElement>) => void
|
||||||
onBlur?: (event?: React.FocusEvent<HTMLInputElement>) => void
|
onBlur?: (event?: React.FocusEvent<HTMLInputElement>) => void
|
||||||
}
|
}
|
||||||
@ -23,6 +24,7 @@ export function Input (props: InputProps) {
|
|||||||
inside = false,
|
inside = false,
|
||||||
autoFocus = false,
|
autoFocus = false,
|
||||||
type = 'text',
|
type = 'text',
|
||||||
|
disabled = false,
|
||||||
onChange = noop,
|
onChange = noop,
|
||||||
onBlur = noop
|
onBlur = noop
|
||||||
} = props
|
} = props
|
||||||
@ -30,6 +32,7 @@ export function Input (props: InputProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
|
disabled={disabled}
|
||||||
className={classname}
|
className={classname}
|
||||||
style={style}
|
style={style}
|
||||||
value={value}
|
value={value}
|
||||||
|
@ -152,6 +152,7 @@ export default function Settings () {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<Input
|
<Input
|
||||||
|
disabled={clashXData.isClashX}
|
||||||
value={info.socks5ProxyPort}
|
value={info.socks5ProxyPort}
|
||||||
onChange={socks5ProxyPort => set('socks5ProxyPort', +socks5ProxyPort)}
|
onChange={socks5ProxyPort => set('socks5ProxyPort', +socks5ProxyPort)}
|
||||||
onBlur={handleSocksPortSave}
|
onBlur={handleSocksPortSave}
|
||||||
@ -166,6 +167,7 @@ export default function Settings () {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<Input
|
<Input
|
||||||
|
disabled={clashXData.isClashX}
|
||||||
value={info.httpProxyPort}
|
value={info.httpProxyPort}
|
||||||
onChange={httpProxyPort => set('httpProxyPort', +httpProxyPort)}
|
onChange={httpProxyPort => set('httpProxyPort', +httpProxyPort)}
|
||||||
onBlur={handleHttpPortSave}
|
onBlur={handleHttpPortSave}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user