From 5564ae0393590c0c04dabedbf3fcc45fc5b9a124 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Sat, 29 Nov 2025 15:58:30 +0100 Subject: [PATCH] fix: add dynamic text to container control loading modal - Update LoadingModal to display action text (Starting/Stopping LXC/VM) - Update handleStartStop to include container type (LXC/VM) in action text - Show clear feedback when starting or stopping containers --- src/app/_components/InstalledScriptsTab.tsx | 4 +++- src/app/_components/LoadingModal.tsx | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/_components/InstalledScriptsTab.tsx b/src/app/_components/InstalledScriptsTab.tsx index 4799a31..a10e8cb 100644 --- a/src/app/_components/InstalledScriptsTab.tsx +++ b/src/app/_components/InstalledScriptsTab.tsx @@ -709,6 +709,8 @@ export function InstalledScriptsTab() { return; } + const containerType = script.is_vm ? "VM" : "LXC"; + setConfirmationModal({ isOpen: true, variant: "simple", @@ -718,7 +720,7 @@ export function InstalledScriptsTab() { setControllingScriptId(script.id); setLoadingModal({ isOpen: true, - action: `${action === "start" ? "Starting" : "Stopping"} container ${script.container_id}...`, + action: `${action === "start" ? "Starting" : "Stopping"} ${containerType}...`, }); void controlContainerMutation.mutate({ id: script.id, action }); setConfirmationModal(null); diff --git a/src/app/_components/LoadingModal.tsx b/src/app/_components/LoadingModal.tsx index 9a06d3c..f3c642e 100644 --- a/src/app/_components/LoadingModal.tsx +++ b/src/app/_components/LoadingModal.tsx @@ -16,7 +16,7 @@ interface LoadingModalProps { export function LoadingModal({ isOpen, - action: _action, + action, logs = [], isComplete = false, title, @@ -64,6 +64,11 @@ export function LoadingModal({ )} + {/* Action text - displayed prominently */} + {action && ( +

{action}

+ )} + {/* Static title text */} {title &&

{title}

}