diff --git a/App.jsx b/App.jsx index defad2d..ab30871 100644 --- a/App.jsx +++ b/App.jsx @@ -4477,6 +4477,18 @@ function JmsPage({ lines, onSave, onDelete, onCheck, onNotify, dragIdx, onDragSt function handleSave() { if (!draft.addr || !draft.port) { onNotify('请填写服务器地址和端口'); return; } + const missing = []; + if (group === 'selfbuilt') { + if (!draft.uuid) missing.push('UUID'); + } else if (protocol === 'ss') { + if (!draft.password) missing.push('密码'); + } else if (protocol === 'vless-reality') { + if (!draft.uuid) missing.push('UUID'); + if (!draft.publicKey) missing.push('Public Key'); + if (!draft.shortId) missing.push('Short ID'); + if (!draft.sni) missing.push('SNI'); + } + if (missing.length) { onNotify(`请填写:${missing.join('、')}`); return; } onSave({ ...draft, group, protocol }, editingId); closeModal(); }