fix: update RestoreVolumeBackups and ShowVolumeBackups components for improved functionality

- Refactored the RestoreVolumeBackups component to ensure the type prop is required and added serverId handling for better integration.
- Corrected variable naming for destinationId in the form handling to prevent potential issues.
- Enhanced the ShowVolumeBackups component to pass serverId to the RestoreVolumeBackups component, ensuring consistent data flow.
- Improved user interface elements for backup file selection, ensuring better usability and clarity.
This commit is contained in:
Mauricio Siu
2025-07-01 01:12:20 -06:00
parent 4f021a3f79
commit c6d760a904
7 changed files with 452 additions and 90 deletions

View File

@@ -415,7 +415,7 @@ export const RestoreBackup = ({
<FormLabel className="flex items-center justify-between">
Search Backup Files
{field.value && (
<Badge variant="outline">
<Badge variant="outline" className="truncate">
{field.value}
<Copy
className="ml-2 size-4 cursor-pointer"
@@ -439,7 +439,9 @@ export const RestoreBackup = ({
!field.value && "text-muted-foreground",
)}
>
{field.value || "Search and select a backup file"}
<span className="truncate text-left flex-1 w-52">
{field.value || "Search and select a backup file"}
</span>
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
</Button>
</FormControl>