feat: shows the latest deployment commit + message on status

This commit is contained in:
Andras Bacsai
2024-05-17 08:53:25 +02:00
parent 6131746180
commit 10fde1b1ef
7 changed files with 38 additions and 11 deletions

View File

@@ -1,12 +1,20 @@
@props([
'status' => 'Restarting',
'lastDeploymentInfo' => null,
'lastDeploymentLink' => null,
])
<div class="flex items-center">
<x-loading wire:loading.delay.longer />
<span wire:loading.remove.delay.longer class="flex items-center">
<div class="badge badge-warning "></div>
<div class="pl-2 pr-1 text-xs font-bold tracking-wider dark:text-warning">
{{ str($status)->before(':')->headline() }}
<div class="pl-2 pr-1 text-xs font-bold tracking-wider dark:text-warning" @if($lastDeploymentInfo) title="{{$lastDeploymentInfo}}" @endif>
@if ($lastDeploymentLink)
<a href="{{ $lastDeploymentLink }}" class="underline cursor-pointer">
{{ str($status)->before(':')->headline() }}
</a>
@else
{{ str($status)->before(':')->headline() }}
@endif
</div>
@if (!str($status)->startsWith('Proxy') && !str($status)->contains('('))
<div class="text-xs dark:text-warning">({{ str($status)->after(':') }})</div>