From 8cc97f9bdb097149f85bc99ed99a1b1ccadce5e3 Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Tue, 28 Nov 2023 20:48:03 -0600 Subject: [PATCH] Spliit the script editor into its own dialog separate from the table. Only pass IDs between game, editor, and dialog for better performance. --- LANCommander/Components/ScriptEditor.razor | 217 +++--------------- .../Components/ScriptEditorDialog.razor | 176 ++++++++++++++ LANCommander/Models/ScriptEditorOptions.cs | 13 ++ LANCommander/Pages/Games/Edit.razor | 2 +- 4 files changed, 221 insertions(+), 187 deletions(-) create mode 100644 LANCommander/Components/ScriptEditorDialog.razor create mode 100644 LANCommander/Models/ScriptEditorOptions.cs diff --git a/LANCommander/Components/ScriptEditor.razor b/LANCommander/Components/ScriptEditor.razor index a2c2a0c..a87ce20 100644 --- a/LANCommander/Components/ScriptEditor.razor +++ b/LANCommander/Components/ScriptEditor.razor @@ -4,75 +4,12 @@ @using LANCommander.Models @using LANCommander.Services @using System.IO.Compression; +@using Microsoft.EntityFrameworkCore; @inject ScriptService ScriptService @inject ModalService ModalService @inject IMessageService MessageService -@{ - RenderFragment Footer = - @; -} - -
- - @foreach (var group in Snippets.Select(s => s.Group).Distinct()) - { - - - - @foreach (var snippet in Snippets.Where(s => s.Group == group)) - { - - @snippet.Name - - } - - - - - - - - } - - @if (ArchiveId != Guid.Empty) - { - - } - - - - - - - - - - - - - - - - - - Requires Admin - - - -