From 36c6036060c63f18a15b08786e34f6378a0e09a7 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 18 May 2026 17:06:28 -0400 Subject: [PATCH] feat(central-ui): enlarge script modal; tab the Shared Script form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Script editor modal (TemplateEdit): the tabbed Trigger/Code/Parameters/ Return content is substantial, so the dialog now fills most of the viewport — a .script-editor-modal class (96vw wide, ~full height) replaces modal-xl, paired with modal-dialog-scrollable so the body scrolls. Shared Script create/edit form (SharedScriptForm): Code, Parameters, and Return type move from stacked sections into a tab strip, matching the template script modal. Panels toggle via display:none so the Monaco editor and JSONJoy island stay mounted across tab switches; Code is the default tab. Name stays above the tabs. Markup/CSS only — no logic change. CentralUI suite 316 green; both verified in the browser. --- .../Pages/Design/SharedScriptForm.razor | 70 +++++++++++++------ .../Pages/Design/TemplateEdit.razor | 2 +- src/ScadaLink.CentralUI/wwwroot/css/site.css | 13 ++++ 3 files changed, 63 insertions(+), 22 deletions(-) diff --git a/src/ScadaLink.CentralUI/Components/Pages/Design/SharedScriptForm.razor b/src/ScadaLink.CentralUI/Components/Pages/Design/SharedScriptForm.razor index 17761f6..236485b 100644 --- a/src/ScadaLink.CentralUI/Components/Pages/Design/SharedScriptForm.razor +++ b/src/ScadaLink.CentralUI/Components/Pages/Design/SharedScriptForm.razor @@ -26,32 +26,59 @@ {
-
+
-
- - -
-
- - -
-
- - - + + @* Tabs: Code, Parameters, Return. Panels stay mounted (toggled + via display:none) so the Monaco editor and the JSONJoy React + island don't tear down on tab switch. *@ + +
+
+ + +
+
+ +
+
+ +
+ @if (_formError != null) {
@_formError
@@ -156,6 +183,7 @@ [Parameter] public int? Id { get; set; } private bool _loading; + private string _formTab = "code"; // "code" | "parameters" | "return" private string _formName = string.Empty; private string _formCode = string.Empty; private string? _formParameters; diff --git a/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor b/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor index b83338e..64c8840 100644 --- a/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor +++ b/src/ScadaLink.CentralUI/Components/Pages/Design/TemplateEdit.razor @@ -863,7 +863,7 @@ { var editingScript = _editScriptId.HasValue;