Skip to content

Commit 5564ae0

Browse files
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
1 parent 93d7842 commit 5564ae0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/app/_components/InstalledScriptsTab.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ export function InstalledScriptsTab() {
709709
return;
710710
}
711711

712+
const containerType = script.is_vm ? "VM" : "LXC";
713+
712714
setConfirmationModal({
713715
isOpen: true,
714716
variant: "simple",
@@ -718,7 +720,7 @@ export function InstalledScriptsTab() {
718720
setControllingScriptId(script.id);
719721
setLoadingModal({
720722
isOpen: true,
721-
action: `${action === "start" ? "Starting" : "Stopping"} container ${script.container_id}...`,
723+
action: `${action === "start" ? "Starting" : "Stopping"} ${containerType}...`,
722724
});
723725
void controlContainerMutation.mutate({ id: script.id, action });
724726
setConfirmationModal(null);

src/app/_components/LoadingModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface LoadingModalProps {
1616

1717
export function LoadingModal({
1818
isOpen,
19-
action: _action,
19+
action,
2020
logs = [],
2121
isComplete = false,
2222
title,
@@ -64,6 +64,11 @@ export function LoadingModal({
6464
)}
6565
</div>
6666

67+
{/* Action text - displayed prominently */}
68+
{action && (
69+
<p className="text-foreground text-base font-medium">{action}</p>
70+
)}
71+
6772
{/* Static title text */}
6873
{title && <p className="text-muted-foreground text-sm">{title}</p>}
6974

0 commit comments

Comments
 (0)