mailwolt/resources/views/livewire/ui/system/modal/update-modal.blade.php

54 lines
2.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<div wire:poll.2s="refresh" class="p-4">
<div class="flex items-center gap-3 mb-3">
<div class="shrink-0 w-10 h-10 rounded-full bg-emerald-500/15 border border-emerald-400/30
flex items-center justify-center">
<i class="ph ph-arrows-clockwise text-xl {{ $state==='done' ? '' : 'animate-spin' }}"></i>
</div>
<div>
<div class="text-white/90 font-semibold">
{{ $state==='done'
? ($rc===0 ? 'Update abgeschlossen' : 'Update fehlgeschlagen')
: 'Update läuft …' }}
</div>
<div class="text-xs text-white/60">
{{ $line ?? '' }}
</div>
</div>
</div>
{{-- Progress --}}
<div class="mb-3">
<div class="h-2 bg-white/10 rounded overflow-hidden">
<div class="h-full bg-emerald-400 transition-all"
style="width: {{ $percent }}%"></div>
</div>
<div class="text-[11px] text-white/50 mt-1">{{ $percent }}%</div>
</div>
{{-- Log Tail --}}
<div class="rounded-lg bg-black/40 border border-white/10 p-2 max-h-64 overflow-auto text-[12px] font-mono text-white/80">
@foreach($tail as $l)
{{ $l }}
@endforeach
</div>
<div class="mt-4 flex justify-end gap-2">
@if($state==='done' && $rc===0)
<button wire:click="$dispatch('closeModal')" class="px-3 py-1 rounded-md
bg-emerald-500/10 border border-emerald-400/30 text-emerald-200">
Schließen
</button>
@elseif($state==='done' && $rc!==0)
<button wire:click="$dispatch('closeModal')" class="px-3 py-1 rounded-md
bg-rose-500/10 border border-rose-400/30 text-rose-200">
Schließen
</button>
@else
<button class="px-3 py-1 rounded-md bg-white/10 border border-white/15 text-white/50 cursor-not-allowed" disabled>
Bitte warten
</button>
@endif
</div>
</div>