diff --git a/lang/de/servers.php b/lang/de/servers.php index 863bfb1..2fad059 100644 --- a/lang/de/servers.php +++ b/lang/de/servers.php @@ -10,6 +10,7 @@ return [ 'status_online' => 'Online', 'status_warning' => 'Warnung', 'status_offline' => 'Offline', + 'status_pending' => 'Initialisierung', // ── Index: header ───────────────────────────────────────────────────── 'fleet_eyebrow' => 'Flotte', diff --git a/lang/en/servers.php b/lang/en/servers.php index 07304da..84f59c6 100644 --- a/lang/en/servers.php +++ b/lang/en/servers.php @@ -10,6 +10,7 @@ return [ 'status_online' => 'Online', 'status_warning' => 'Warning', 'status_offline' => 'Offline', + 'status_pending' => 'Initializing', // ── Index: header ───────────────────────────────────────────────────── 'fleet_eyebrow' => 'Fleet', diff --git a/resources/views/components/server-item.blade.php b/resources/views/components/server-item.blade.php index 6fc05be..870248c 100644 --- a/resources/views/components/server-item.blade.php +++ b/resources/views/components/server-item.blade.php @@ -1,9 +1,9 @@ @props(['name', 'ip', 'status' => 'online', 'cpu' => 0, 'mem' => 0, 'os' => null]) @php - $label = ['online' => __('common.online'), 'warning' => __('common.warning'), 'offline' => __('common.offline')][$status] ?? ucfirst($status); + $label = ['online' => __('common.online'), 'warning' => __('common.warning'), 'offline' => __('common.offline'), 'pending' => __('servers.status_pending')][$status] ?? ucfirst($status); @endphp - +

{{ $name }}

{{ $ip }}@if ($os) · {{ $os }}@endif

diff --git a/resources/views/components/status-dot.blade.php b/resources/views/components/status-dot.blade.php index d4d1119..2332812 100644 --- a/resources/views/components/status-dot.blade.php +++ b/resources/views/components/status-dot.blade.php @@ -1,7 +1,7 @@ @props(['status' => 'offline', 'ping' => false]) @php - $c = ['online' => 'bg-online', 'warning' => 'bg-warning', 'offline' => 'bg-offline'][$status] ?? 'bg-ink-4'; - $glow = ['online' => 'shadow-[0_0_6px_var(--color-online)]', 'warning' => 'shadow-[0_0_5px_var(--color-warning)]'][$status] ?? ''; + $c = ['online' => 'bg-online', 'warning' => 'bg-warning', 'offline' => 'bg-offline', 'pending' => 'bg-cyan'][$status] ?? 'bg-ink-4'; + $glow = ['online' => 'shadow-[0_0_6px_var(--color-online)]', 'warning' => 'shadow-[0_0_5px_var(--color-warning)]', 'pending' => 'shadow-[0_0_5px_var(--color-cyan)]'][$status] ?? ''; @endphp merge(['class' => 'relative inline-flex h-2 w-2 shrink-0']) }}> @if ($ping) diff --git a/resources/views/components/status-pill.blade.php b/resources/views/components/status-pill.blade.php index 86d51c7..b861fec 100644 --- a/resources/views/components/status-pill.blade.php +++ b/resources/views/components/status-pill.blade.php @@ -4,9 +4,10 @@ 'online' => 'text-online border-online/20 bg-online/10', 'warning' => 'text-warning border-warning/20 bg-warning/10', 'offline' => 'text-offline border-offline/20 bg-offline/10', + 'pending' => 'text-cyan border-cyan/20 bg-cyan/10', ][$status] ?? 'text-ink-3 border-line bg-line'; @endphp merge(['class' => "inline-flex items-center gap-1.5 rounded-sm border px-2 py-0.5 font-mono text-xs $c"]) }}> - + {{ $slot }} diff --git a/resources/views/livewire/servers/index.blade.php b/resources/views/livewire/servers/index.blade.php index 132d8ab..d1e6b79 100644 --- a/resources/views/livewire/servers/index.blade.php +++ b/resources/views/livewire/servers/index.blade.php @@ -1,5 +1,5 @@ @php - $label = ['online' => __('servers.status_online'), 'warning' => __('servers.status_warning'), 'offline' => __('servers.status_offline')]; + $label = ['online' => __('servers.status_online'), 'warning' => __('servers.status_warning'), 'offline' => __('servers.status_offline'), 'pending' => __('servers.status_pending')]; @endphp
@@ -56,7 +56,7 @@ wire:navigate class="flex min-h-11 items-center gap-3 px-4 py-3 transition-colors hover:bg-raised sm:px-5" > - +

{{ $server->name }}

diff --git a/tests/Feature/StatusComponentTest.php b/tests/Feature/StatusComponentTest.php new file mode 100644 index 0000000..5c84c3f --- /dev/null +++ b/tests/Feature/StatusComponentTest.php @@ -0,0 +1,22 @@ +Init'); + $this->assertStringContainsString('text-cyan', $html); + $this->assertStringContainsString('bg-cyan/10', $html); + } + + public function test_pending_dot_uses_cyan(): void + { + $html = Blade::render(''); + $this->assertStringContainsString('bg-cyan', $html); + } +}