From 9c3da55c5d2a6bfe14540f7b5291e97e9b27f88b Mon Sep 17 00:00:00 2001 From: LordMathis Date: Tue, 23 Sep 2025 18:12:58 +0200 Subject: [PATCH] Improve InstanceCard layout --- webui/src/components/InstanceCard.tsx | 104 ++++++++++++++++---------- 1 file changed, 63 insertions(+), 41 deletions(-) diff --git a/webui/src/components/InstanceCard.tsx b/webui/src/components/InstanceCard.tsx index b152262..b3b3339 100644 --- a/webui/src/components/InstanceCard.tsx +++ b/webui/src/components/InstanceCard.tsx @@ -2,7 +2,7 @@ import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import type { Instance } from "@/types/instance"; -import { Edit, FileText, Play, Square, Trash2 } from "lucide-react"; +import { Edit, FileText, Play, Square, Trash2, MoreHorizontal } from "lucide-react"; import LogsDialog from "@/components/LogDialog"; import HealthBadge from "@/components/HealthBadge"; import BackendBadge from "@/components/BackendBadge"; @@ -25,6 +25,7 @@ function InstanceCard({ editInstance, }: InstanceCardProps) { const [isLogsOpen, setIsLogsOpen] = useState(false); + const [showAllActions, setShowAllActions] = useState(false); const health = useInstanceHealth(instance.name, instance.status); const handleStart = () => { @@ -55,39 +56,44 @@ function InstanceCard({ return ( <> - - -
- {instance.name} -
- {running && } + + + {/* Header with instance name and status badges */} +
+ + {instance.name} + + + {/* Badges row */} +
+ {running && }
- -
+ + {/* Primary actions - always visible */} +
- - - -
+ + {/* Secondary actions - collapsible */} + {showAllActions && ( +
+ + + +
+ )}