diff --git a/src/App.svelte b/src/App.svelte index f9e9ccb..a4ba99f 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -8,7 +8,6 @@ let connectionError = null; let processingTargets = {}; - // Selection router state tracker let activeFocusedInstance = null; async function syncTelemetry() { @@ -16,7 +15,6 @@ instances = await fetchInstances(); connectionError = null; - // Keep our detailed view object synced with fresh status polling adjustments if (activeFocusedInstance) { const freshSnapshot = instances.find(i => i.name === activeFocusedInstance.name); if (freshSnapshot) activeFocusedInstance = freshSnapshot; @@ -47,24 +45,25 @@ }); -
-
+
+ +
-

-- VSSM DASHBOARD --

-

VintageStory Server Manager

+

VSSM Dashboard

+

VintageStory Server Manager

{#if !activeFocusedInstance} {/if}
{#if connectionError} -
- +
+ {connectionError}
{/if} diff --git a/src/lib/components/InstanceDetail.svelte b/src/lib/components/InstanceDetail.svelte index 963ec7f..5999007 100644 --- a/src/lib/components/InstanceDetail.svelte +++ b/src/lib/components/InstanceDetail.svelte @@ -10,7 +10,6 @@ let isSending = false; let terminalContainer; - function logsAreEqual(arr1, arr2) { if (arr1.length !== arr2.length) return false; for (let i = 0; i < arr1.length; i++) { @@ -19,11 +18,9 @@ return true; } - async function syncLogs() { try { const logs = await fetchServerLogs(instance.name); - if (!logsAreEqual(logs, terminalLogs)) { terminalLogs = logs; autoScrollToBottom(); @@ -33,7 +30,6 @@ } } - function autoScrollToBottom() { if (terminalContainer) { setTimeout(() => { @@ -62,9 +58,7 @@ onMount(() => { syncLogs(); - // Check for new logs every second const logInterval = setInterval(syncLogs, 1000); - return () => clearInterval(logInterval); }); @@ -73,70 +67,70 @@
-
-
- Server: {instance.name} - ({instance.version}) +
+
+ Active Server: {instance.name} + ({instance.version})
-
-
- Console Output - - ● {instance.status} +
+
+ Live Server Console + + {instance.status}
+ class="flex-1 p-4 overflow-y-auto text-xs space-y-1 bg-stone-950/40 text-stone-200 font-mono select-text selection:bg-stone-700"> {#if terminalLogs.length === 0} -
[No console logs available.]
+
[Waiting for log output...]
{:else} {#each terminalLogs as line} -
{line}
+
{line}
{/each} {/if}
- > + class="border-t border-stone-700/60 bg-stone-800/40 flex items-center"> + > + placeholder={instance.status === 'RUNNING' ? "Type a command and press Enter..." : "Console is read-only while server is offline."} + class="w-full bg-transparent px-3 py-3 text-xs text-stone-100 placeholder-stone-500 focus:outline-none disabled:cursor-not-allowed" />
-
-

- Server Operations +
+

+ Operations

-
- - -
diff --git a/src/lib/components/InstanceList.svelte b/src/lib/components/InstanceList.svelte index 1cad35e..67aab9f 100644 --- a/src/lib/components/InstanceList.svelte +++ b/src/lib/components/InstanceList.svelte @@ -1,41 +1,40 @@ -
+
- + - + - + {#if instances.length === 0} - {:else} {#each instances as inst} onSelectInstance(inst)} - class="hover:bg-neutral-900/40 transition-colors cursor-pointer"> - - - + class="hover:bg-stone-800/40 transition-colors cursor-pointer"> + + + @@ -43,11 +42,11 @@
Instance ID Engine Version Network Port Runtime StatusQuick ControlsControls
- No managed target nodes registered with daemon configuration profile. + + No server instances found in your configuration.
{inst.name}{inst.version}{inst.port}{inst.name}{inst.version}{inst.port} - - + + {inst.status}