diff --git a/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor b/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor index 9e081ba..b83338e 100644 --- a/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor +++ b/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor @@ -104,7 +104,7 @@ private string? _scriptReturn; private bool _scriptIsLocked; private string? _scriptFormError; - private string _scriptModalTab = "code"; // "code" | "parameters" | "return" + private string _scriptModalTab = "trigger"; // "trigger" | "code" | "parameters" | "return" private MonacoEditor? _scriptEditor; private IReadOnlyList _scriptMarkers = Array.Empty(); @@ -875,54 +875,6 @@ -
- - -
- @if (ScriptTriggerConfigCodec.SupportsMinTimeBetweenRuns(_scriptTriggerType)) - { -
- -
-
- -
-
- -
-
- @if (ScriptTriggerIsWhileTrue()) - { -
- This is the re-fire interval for the - WhileTrue trigger above. -
- @if (DurationInput.Compose(_scriptMinTimeValue, _scriptMinTimeUnit) is null) - { -
- The WhileTrue trigger has no interval set — the script - will fire only once. Set a value here to make it re-fire. -
- } - } - else - { -
- Optional throttle — skips trigger invocations that fire - sooner than this. -
- } -
- }
@@ -931,10 +883,17 @@
- @* Tabs: Code, Parameters, Return. Both editor panels stay - mounted (toggled via display:none) so Monaco and the + @* Tabs: Trigger, Code, Parameters, Return. All panels stay + mounted (toggled via display:none) so Monaco editors and the JSONJoy React island don't tear down on tab switch. *@
+
+ + @if (ScriptTriggerConfigCodec.SupportsMinTimeBetweenRuns(_scriptTriggerType)) + { +
+ +
+
+ +
+
+ +
+
+ @if (ScriptTriggerIsWhileTrue()) + { +
+ This is the re-fire interval for the + WhileTrue trigger above. +
+ @if (DurationInput.Compose(_scriptMinTimeValue, _scriptMinTimeUnit) is null) + { +
+ The WhileTrue trigger has no interval set — the script + will fire only once. Set a value here to make it re-fire. +
+ } + } + else + { +
+ Optional throttle — skips trigger invocations that fire + sooner than this. +
+ } +
+ } +