From ca713f6d3f1fb1c38e816cc030b29ecd7690a9d0 Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Wed, 10 Jun 2026 20:19:06 -0500 Subject: [PATCH] Rework .reg importing in script editor Script editor now supports drag and drop for .ps1, .reg, and other text files. .ps1 files will be handled by replacing the contents of the text editor. .reg files will be converted to PowerShell commands and inserted into the script editor. Any other text file will be inserted as an escaped string. --- .../UI/Components/ScriptEditorDialog.razor | 4 - .../UI/Components/ScriptTextEditor.razor | 3 - .../Components/CodeInput/CodeInput.razor | 3 + .../Components/CodeInput/FileDropHandler.ts | 244 ++++++++++++++++++ .../MonacoCodeEditor/MonacoCodeEditor.cs | 2 + LANCommander.UI/_Imports.razor.ts | 3 +- 6 files changed, 251 insertions(+), 8 deletions(-) create mode 100644 LANCommander.UI/Components/CodeInput/FileDropHandler.ts diff --git a/LANCommander.Server/UI/Components/ScriptEditorDialog.razor b/LANCommander.Server/UI/Components/ScriptEditorDialog.razor index b6bded98..087de700 100644 --- a/LANCommander.Server/UI/Components/ScriptEditorDialog.razor +++ b/LANCommander.Server/UI/Components/ScriptEditorDialog.razor @@ -80,8 +80,6 @@ } - - @if (IsDebuggable && HasDebugTarget) { @@ -107,14 +105,12 @@ - @code { Guid _id = Guid.NewGuid(); Form