feat: add restore volume backups component and integrate into show volume backups

- Introduced a new RestoreVolumeBackups component to facilitate the restoration of volume backups from selected files and destinations.
- Integrated the RestoreVolumeBackups component into the ShowVolumeBackups component, enhancing user experience by providing direct access to restoration functionality.
- Updated the restore-backup schema to include validation for destination and backup file selection, ensuring robust user input handling.
This commit is contained in:
Mauricio Siu
2025-06-30 22:50:46 -06:00
parent d15ccfe505
commit 4f021a3f79
6 changed files with 449 additions and 8 deletions

View File

@@ -199,7 +199,7 @@ const RestoreBackupSchema = z
}
});
const formatBytes = (bytes: number): string => {
export const formatBytes = (bytes: number): string => {
if (bytes === 0) return "0 Bytes";
const k = 1024;
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];