Merge branch 'master' of ssh://gitea.limil.top:32222/limil/WG

This commit is contained in:
limil 2026-02-09 22:43:39 +08:00
commit 44356cb88a
3 changed files with 14 additions and 6 deletions

View File

@ -124,7 +124,10 @@ function FlowContent(): ReactNode {
setNodes((prev) =>
prev.map((node) => {
if (node.data.id === editingNode?.id) {
node.data = {...node.data, ...updatedData}
return {
...node,
data: {...node.data, ...updatedData}
}
}
return node;
})

View File

@ -23,6 +23,14 @@ class Validation {
function Validate(updateData : NodeDataUpdate, settings : Settings) : Validation {
const errors: string[] = [];
if(!updateData.label) {
errors.push("Label不能是空");
}
if(!updateData.privateKey) {
errors.push("privateKey不能是空");
}
const ipv4Subnet = settings.ipv4Subnet;
const ipv4Address = updateData.ipv4Address;
if(ipv4Subnet) {

View File

@ -83,11 +83,8 @@ export default function SettingsEditor({
min="30000"
max="49151"
step="1"
value={listenPort}
onChange={e => {
const value = e.target.valueAsNumber;
setListenPort(isNaN(value) ? 38894 : value);
}}
value={listenPort || ""}
onChange={e => setListenPort(e.target.valueAsNumber)}
/>
</div>