37 lines
1.7 KiB
PHP
37 lines
1.7 KiB
PHP
<div class="bg-white/5 border border-white/10 rounded-xl p-4"
|
|
@if($running) wire:poll.3s="poll" @endif>
|
|
<div class="flex items-center justify-between gap-3">
|
|
<div class="text-white/80">
|
|
<strong>MailWolt Update</strong>
|
|
@if($latest)
|
|
<span class="ml-2 px-2 py-0.5 rounded-full text-xs border border-blue-400/40 bg-blue-500/10 text-blue-200">
|
|
verfügbar: {{ $latest }}
|
|
</span>
|
|
@endif
|
|
@if($running)
|
|
<span class="ml-2 px-2 py-0.5 rounded-full text-xs border border-white/20 bg-white/10">läuft …</span>
|
|
@elseif(!is_null($rc))
|
|
<span class="ml-2 px-2 py-0.5 rounded-full text-xs border {{ $rc===0 ? 'border-emerald-400/40 bg-emerald-500/10 text-emerald-200' : 'border-rose-400/40 bg-rose-500/10 text-rose-200' }}">
|
|
{{ $rc===0 ? 'fertig' : 'fehler' }}
|
|
</span>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="flex items-center gap-2">
|
|
<button wire:click="runUpdate"
|
|
@disabled($running)
|
|
class="bg-blue-600 hover:bg-blue-500 disabled:opacity-50 text-white px-3 py-1 rounded">
|
|
Jetzt aktualisieren
|
|
</button>
|
|
<button wire:click="refreshState"
|
|
class="border border-white/10 bg-white/5 text-white/80 px-3 py-1 rounded hover:border-white/20">
|
|
Neu laden
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
@if($running || !empty($log))
|
|
<pre class="mt-3 max-h-64 overflow-auto text-xs bg-black/40 rounded p-3 border border-white/10 text-white/80">{{ $log }}</pre>
|
|
@endif
|
|
</div>
|