From 36e201e8248198fbe8eaab7f4fa7bc8bc850ea79 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 3 Feb 2026 17:33:18 +0100 Subject: [PATCH] Update virtual-machines.tsx --- AppImage/components/virtual-machines.tsx | 178 +++++++++++++---------- 1 file changed, 100 insertions(+), 78 deletions(-) diff --git a/AppImage/components/virtual-machines.tsx b/AppImage/components/virtual-machines.tsx index a2d564d1..8d47ffb9 100644 --- a/AppImage/components/virtual-machines.tsx +++ b/AppImage/components/virtual-machines.tsx @@ -8,7 +8,7 @@ import { Badge } from "./ui/badge" import { Progress } from "./ui/progress" import { Button } from "./ui/button" import { Dialog, DialogContent, DialogHeader, DialogTitle } from "./ui/dialog" -import { Server, Play, Square, Cpu, MemoryStick, HardDrive, Network, Power, RotateCcw, StopCircle, Container, ChevronDown, ChevronUp, Terminal, Archive, Loader2, ChevronLeft, ChevronRight } from 'lucide-react' +import { Server, Play, Square, Cpu, MemoryStick, HardDrive, Network, Power, RotateCcw, StopCircle, Container, ChevronDown, ChevronUp, Terminal, Archive, Loader2, ChevronLeft, ChevronRight, RefreshCw, Save } from 'lucide-react' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select" import useSWR from "swr" import { MetricsView } from "./metrics-dialog" @@ -1243,17 +1243,12 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => {
{/* Mobile carousel container */} -
+
+ {/* Page 0: Main content */}
- {/* Page 0: Main content */} -
{selectedVM && ( <> @@ -1374,11 +1369,13 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => { )}
-
+
- {/* Page 1: Backups */} -
-
+ {/* Page 1: Backups */} +
+

Create Backup

@@ -1450,7 +1447,7 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => {
{/* Mobile pagination dots */} -
+
- {/* Desktop layout */} -
-
+{/* Desktop layout */} +
+
{selectedVM && ( <>
@@ -1560,78 +1557,103 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => { {/* Backups Section - Always visible, loads independently */} - -
-

- Backups -

+ +
+
+
+ +
+

+ Backups +

+
-
- {/* Create Backup */} -
- -
- - -
-
- - {/* Backup List */} -
- - {loadingBackups ? ( -
- - Loading... -
- ) : vmBackups.length === 0 ? ( -
- No backups found -
- ) : ( -
- {vmBackups.map((backup, index) => ( -
- {backup.date} - {backup.size_human} -
+ {/* Create Backup - Top section */} +
+ +
+ +
+ + {/* Divider */} +
+ + {/* Backup List - Bottom section */} +
+
+ + + {vmBackups.length} total + +
+ {loadingBackups ? ( +
+ + Loading backups... +
+ ) : vmBackups.length === 0 ? ( +
+ No backups found for this VM +
+ ) : ( +
+ {vmBackups.map((backup, index) => ( +
+
+
+ {backup.date} +
+ + {backup.size_human} + +
+ ))} +
+ )} +