feat(resources): add responsive mobile navigation menus

Unify application, database, and service headings with mobile-friendly
resource menus, route-aware configuration tabs, and confirmation triggers for
advanced actions. Standardize restart warnings with status badges and cover the
responsive menu and badge rendering behavior with feature tests.
This commit is contained in:
Andras Bacsai committed 2026-06-05 14:57:57 +02:00
1 parent 51583069f4
commit a9d9bfdbe3
15 files changed
+1238 -414

No files matched your search

@@ -76,3 +76,39 @@ it('renders health warning helpers as badges instead of warning icons', function
->not->toContain('class="px-2"')
->not->toContain('viewBox="0 0 256 256"');
});
it('renders restart counts as warning badges', function () {
$resource = new class
{
public string $status = 'running:unknown';
public int $restart_count = 9;
public ?int $max_restart_count = null;
public ?string $last_restart_type = null;
public $last_restart_at;
public function __construct()
{
$this->last_restart_at = now();
}
};
$html = view('components.status.index', [
'resource' => $resource,
'showRefreshButton' => false,
])->render();
$statusIndex = file_get_contents(resource_path('views/components/status/index.blade.php'));
expect($html)
->toContain('9x restarts')
->toContain('border-yellow-300 bg-yellow-50')
->not->toContain('(9x restarts)');
expect($statusIndex)
->toContain('<x-status-badge')
->toContain('restart_count')
->not->toContain('class="text-xs dark:text-warning"');
});