This commit is contained in:
@@ -43,6 +43,12 @@ namespace Nodify.Calculator
|
||||
nodeData.NthIndex = take.NthIndex;
|
||||
nodeData.IsRandom = take.IsRandom;
|
||||
break;
|
||||
case AuthOperationViewModel auth:
|
||||
nodeData.NodeType = "System";
|
||||
nodeData.SystemOp = auth.SystemOperationType.ToString();
|
||||
nodeData.AuthBaseUrl = auth.BaseUrl ?? string.Empty;
|
||||
nodeData.AuthType = auth.AuthType ?? string.Empty;
|
||||
break;
|
||||
case FunctionOperationViewModel func:
|
||||
nodeData.NodeType = "Function";
|
||||
nodeData.FunctionName = func.FunctionName;
|
||||
@@ -417,6 +423,25 @@ namespace Nodify.Calculator
|
||||
op.Output.Add(DeserializeConnector(sc, false));
|
||||
}
|
||||
}
|
||||
else if (sysVm.SystemOperationType == SystemOperations.AUTH)
|
||||
{
|
||||
if (op is AuthOperationViewModel authOp)
|
||||
{
|
||||
authOp.BaseUrl = nd.AuthBaseUrl ?? string.Empty;
|
||||
if (!string.IsNullOrEmpty(nd.AuthType))
|
||||
authOp.AuthType = nd.AuthType;
|
||||
|
||||
// Restore data input connectors (preserve the leading triangle flow connector).
|
||||
var dataInputs = op.Input.Where(i => i.Shape != ConnectorShape.Triangle).ToList();
|
||||
foreach (var d in dataInputs) op.Input.Remove(d);
|
||||
|
||||
foreach (var ic in nd.InputConnectors)
|
||||
{
|
||||
if (ic.Shape == "Triangle") continue;
|
||||
op.Input.Add(DeserializeConnector(ic, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sysVm.SystemOperationType == SystemOperations.KNOT)
|
||||
{
|
||||
// Restore knot connector shape/color/datatype from saved data
|
||||
|
||||
@@ -30,6 +30,10 @@ namespace Nodify.Calculator.Models
|
||||
public string SystemOp { get; set; } = string.Empty;
|
||||
public string ClassName { get; set; } = string.Empty;
|
||||
|
||||
// Auth node properties
|
||||
public string AuthBaseUrl { get; set; } = string.Empty;
|
||||
public string AuthType { get; set; } = string.Empty;
|
||||
|
||||
// Take node properties
|
||||
public int NthIndex { get; set; }
|
||||
public bool IsRandom { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user