From f730bc7380434630b5823ecfdae654e7c6da087b Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Tue, 16 Jun 2020 23:01:32 +0800 Subject: [PATCH] Chore: disable change port on clashx --- src/components/Input/index.tsx | 3 +++ src/containers/Settings/index.tsx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/components/Input/index.tsx b/src/components/Input/index.tsx index 84fb975..c118a0f 100644 --- a/src/components/Input/index.tsx +++ b/src/components/Input/index.tsx @@ -10,6 +10,7 @@ interface InputProps extends BaseComponentProps { inside?: boolean autoFocus?: boolean type?: string + disabled?: boolean onChange?: (value: string, event?: React.ChangeEvent) => void onBlur?: (event?: React.FocusEvent) => void } @@ -23,6 +24,7 @@ export function Input (props: InputProps) { inside = false, autoFocus = false, type = 'text', + disabled = false, onChange = noop, onBlur = noop } = props @@ -30,6 +32,7 @@ export function Input (props: InputProps) { return ( set('socks5ProxyPort', +socks5ProxyPort)} onBlur={handleSocksPortSave} @@ -166,6 +167,7 @@ export default function Settings () { set('httpProxyPort', +httpProxyPort)} onBlur={handleHttpPortSave}