mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-29 06:31:58 +00:00
fix(hosts): keep TLS override fields visible when Security is same (#6452)
When Security is same, Fingerprint/SNI and TLS extras stayed live in form state but were hidden, so stale values could not be cleared (#6444).
This commit is contained in:
1 parent
503b5df4b9
commit
72df05a403
1 file changed
+2
-2
@@ -91,8 +91,8 @@ export default function HostFormModal({
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const security = (useWatch({ control: methods.control, name: 'security' }) ?? 'same') as string;
|
||||
const showTls = security === 'tls' || security === 'reality';
|
||||
const showTlsExtras = security === 'tls';
|
||||
const showTls = security === 'tls' || security === 'reality' || security === 'same';
|
||||
const showTlsExtras = security === 'tls' || security === 'same';
|
||||
|
||||
// React resets this during render rather than in an effect so the modal's
|
||||
// first open frame already shows cleared fields.
|
||||
|
||||
Reference in new issue
Block a user