diff --git a/resources/css/app.css b/resources/css/app.css index bcbabe389..6fb1b35cb 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -2234,6 +2234,7 @@ input[type="search"]::-webkit-search-results-decoration { .backup-table-grid { grid-template-columns: minmax(10rem, 1.7fr) 6rem minmax(7rem, 0.8fr) 7.5rem 6.5rem minmax(8rem, 1fr) 5rem; + min-width: 50rem; } /* Persistent storage volumes: Name | Source | Destination | [PR suffix] | Backup | [Actions] */ @@ -2468,16 +2469,6 @@ input[type="search"]::-webkit-search-results-decoration { } @media (max-width: 900px) { - .backup-table-grid { - grid-template-columns: minmax(10rem, 1.5fr) 6rem 7.5rem 6.5rem; - } - - .backup-table-grid > :nth-child(3), - .backup-table-grid > :nth-child(6), - .backup-table-grid > :nth-child(7) { - display: none; - } - .team-members-table-grid { grid-template-columns: minmax(0, 1fr) 7rem 7rem; } @@ -2529,14 +2520,6 @@ input[type="search"]::-webkit-search-results-decoration { width: 100%; } - .backup-table-grid { - grid-template-columns: minmax(0, 1fr) 7.5rem 6.5rem; - } - - .backup-table-grid > :nth-child(2) { - display: none; - } - .team-members-table-grid { grid-template-columns: minmax(0, 1fr) 6.5rem; } diff --git a/resources/views/livewire/project/application/backup/index.blade.php b/resources/views/livewire/project/application/backup/index.blade.php index 12660d527..888083210 100644 --- a/resources/views/livewire/project/application/backup/index.blade.php +++ b/resources/views/livewire/project/application/backup/index.blade.php @@ -172,7 +172,7 @@ @if ($backups->isNotEmpty()) -
+
Target Type diff --git a/resources/views/livewire/project/service/volume-backup/index.blade.php b/resources/views/livewire/project/service/volume-backup/index.blade.php index 78c7d969b..6b8373a63 100644 --- a/resources/views/livewire/project/service/volume-backup/index.blade.php +++ b/resources/views/livewire/project/service/volume-backup/index.blade.php @@ -173,7 +173,7 @@
@if ($backups->isNotEmpty()) -
+
Target Type diff --git a/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php b/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php index c40733512..e8fdbdab3 100644 --- a/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php +++ b/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php @@ -101,12 +101,13 @@ @endif - + @if ($execution->status === 'success' && ! $execution->local_storage_deleted) - - Download - + @endif @if ($execution->status !== 'running') - Delete + @endif diff --git a/tests/Feature/PersistentStorageVolumesLayoutTest.php b/tests/Feature/PersistentStorageVolumesLayoutTest.php index cf1ed1287..4019606e1 100644 --- a/tests/Feature/PersistentStorageVolumesLayoutTest.php +++ b/tests/Feature/PersistentStorageVolumesLayoutTest.php @@ -13,6 +13,26 @@ it('keeps the volume backup executions table horizontally scrollable on mobile', ->not->toContain('.data-table-header.volume-backup-executions-grid'); }); +it('uses compact icon actions for volume backup executions', function () { + $view = file_get_contents(resource_path('views/livewire/project/shared/storages/volume-backups/executions.blade.php')); + + expect($view) + ->toContain('title="Download backup" aria-label="Download backup"') + ->toContain('') + ->toContain('title="Delete backup" aria-label="Delete backup"') + ->toContain(''); +}); + +it('keeps storage backup schedule tables horizontally scrollable on mobile', function () { + $applicationView = file_get_contents(resource_path('views/livewire/project/application/backup/index.blade.php')); + $serviceView = file_get_contents(resource_path('views/livewire/project/service/volume-backup/index.blade.php')); + $css = file_get_contents(resource_path('css/app.css')); + + expect($applicationView)->toContain('class="data-table w-full overflow-x-auto"') + ->and($serviceView)->toContain('class="data-table w-full overflow-x-auto"') + ->and($css)->toMatch('/\.backup-table-grid\s*\{[^}]*min-width:\s*50rem;/'); +}); + use App\Livewire\Project\Service\VolumeBackup\Create as CreateServiceVolumeBackup; use App\Livewire\Project\Shared\Storages\All; use App\Models\Application;