Merge branch 'master' of ssh://gitea.limil.top:32222/limil/WG
This commit is contained in:
commit
44356cb88a
@ -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;
|
||||
})
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user