From a22846993f1c976b7a4d7b03efd21d128648ab2d Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Wed, 25 Feb 2026 19:32:46 +0000 Subject: [PATCH] feat(#5): implement single-page modal editor with live diagram updates --- src/lib/components/Modal.svelte | 16 +- src/lib/components/NetworkDiagram.svelte | 3088 +++++++++++++++------- 2 files changed, 2183 insertions(+), 921 deletions(-) diff --git a/src/lib/components/Modal.svelte b/src/lib/components/Modal.svelte index 187178f..fc9ce35 100644 --- a/src/lib/components/Modal.svelte +++ b/src/lib/components/Modal.svelte @@ -52,7 +52,7 @@ align-items: center; justify-content: center; padding: 1rem; - background: rgba(15, 23, 42, 0.58); + background: var(--modal-overlay); z-index: 1000; } @@ -61,8 +61,8 @@ max-height: 90vh; display: flex; flex-direction: column; - background: #f8fafc; - border: 1px solid #cbd5e1; + background: var(--panel-bg); + border: 1px solid var(--panel-border); border-radius: 12px; box-shadow: 0 24px 48px rgba(15, 23, 42, 0.24); } @@ -73,19 +73,19 @@ justify-content: space-between; gap: 0.5rem; padding: 0.9rem 1rem; - border-bottom: 1px solid #e2e8f0; + border-bottom: 1px solid var(--panel-border); } .modal-header h2 { margin: 0; font-size: 1.05rem; - color: #0f172a; + color: var(--panel-contrast); } .close-button { border: 1px solid transparent; background: transparent; - color: #475569; + color: var(--muted-text); font-size: 1.7rem; line-height: 1; width: 2rem; @@ -95,8 +95,8 @@ } .close-button:hover { - background: #e2e8f0; - color: #0f172a; + background: var(--chip-bg); + color: var(--panel-contrast); } .modal-body { diff --git a/src/lib/components/NetworkDiagram.svelte b/src/lib/components/NetworkDiagram.svelte index 82bbd40..e211495 100644 --- a/src/lib/components/NetworkDiagram.svelte +++ b/src/lib/components/NetworkDiagram.svelte @@ -1,44 +1,100 @@ -
-
-
+
+
+
+ +
+ {#if mapControlsCollapsed} + + {:else} +
+ + + + + + + + + +
+ {/if} +
-
- - - - - - -
Source: {dataSourceLabel}
+
+ {saveStateLabel()} +
+ + {#if hasLoadedInitialData && !writable} +
{readOnlyNotice}
+ {/if} + {#if isLoadingData}
Loading JSON...
{/if} + {#if loadError} -
{loadError}
+
{loadError}
+ {/if} + {#if saveError} +
{saveError}
{/if} {#if tooltip.visible} @@ -1200,93 +1605,727 @@ {/if} + + {#if validationIssues.length > 0} +
+ Validation issues ({validationIssues.length}) +
    + {#each validationIssues as issue (`${issue.path}:${issue.message}`)} +
  • {issue.path}: {issue.message}
  • + {/each} +
+
+ {/if}
(selectedTarget = null)} > - {#if selectedDetails?.type === 'machine'} -