161 lines
7.6 KiB
PHP
161 lines
7.6 KiB
PHP
{{--@php--}}
|
|
{{-- $pos = [--}}
|
|
{{-- 'top-right' => 'top-4 right-4',--}}
|
|
{{-- 'top-left' => 'top-4 left-4',--}}
|
|
{{-- 'bottom-right' => 'bottom-4 right-4',--}}
|
|
{{-- 'bottom-left' => 'bottom-4 left-4',--}}
|
|
{{-- ][$position] ?? 'top-4 right-4';--}}
|
|
|
|
{{-- $base = 'glass-card border border-glass-border/60 rounded-xl shadow-xl--}}
|
|
{{-- backdrop-blur-md px-4 py-3 max-w-sm w-[22rem] text-sm';--}}
|
|
{{-- $ring = match($task['status'] ?? null) {--}}
|
|
{{-- 'queued' => 'ring-1 ring-yellow-500/25',--}}
|
|
{{-- 'running' => 'ring-1 ring-cyan-500/25',--}}
|
|
{{-- 'done' => 'ring-1 ring-green-500/25',--}}
|
|
{{-- 'failed' => 'ring-1 ring-red-500/25',--}}
|
|
{{-- default => '',--}}
|
|
{{-- };--}}
|
|
{{--@endphp--}}
|
|
|
|
{{--<div class="fixed z-50 {{ $pos }}" wire:poll.4s="loadTask">--}}
|
|
{{-- @if($task)--}}
|
|
{{-- <div class="{{ $base }} {{ $ring }}">--}}
|
|
{{-- <div class="flex items-start gap-3">--}}
|
|
{{-- --}}{{-- Status-Icon / Spinner --}}
|
|
{{-- <div class="mt-0.5">--}}
|
|
{{-- @switch($task['status'] ?? '')--}}
|
|
{{-- @case('running')--}}
|
|
{{-- <i class="ph ph-circle-notch animate-spin text-cyan-400 text-lg"></i>--}}
|
|
{{-- @break--}}
|
|
{{-- @case('done')--}}
|
|
{{-- <i class="ph ph-check-circle text-green-400 text-lg"></i>--}}
|
|
{{-- @break--}}
|
|
{{-- @case('failed')--}}
|
|
{{-- <i class="ph ph-x-circle text-red-400 text-lg"></i>--}}
|
|
{{-- @break--}}
|
|
{{-- @default--}}
|
|
{{-- <i class="ph ph-hourglass text-yellow-400 text-lg"></i>--}}
|
|
{{-- @endswitch--}}
|
|
{{-- </div>--}}
|
|
|
|
{{-- <div class="flex-1 min-w-0">--}}
|
|
{{-- <div class="flex items-center gap-2">--}}
|
|
{{-- <span class="badge uppercase">{{ $task['type'] ?? 'TASK' }}</span>--}}
|
|
{{-- <span class="text-gray-300/90 truncate">{{ $task['payload']['domain'] ?? '' }}</span>--}}
|
|
{{-- </div>--}}
|
|
|
|
{{-- @if(!empty($task['message']))--}}
|
|
{{-- <p class="mt-1.5 text-gray-200/90">{{ $task['message'] }}</p>--}}
|
|
{{-- @endif--}}
|
|
|
|
{{-- @if(($task['status'] ?? '') === 'running')--}}
|
|
{{-- <div class="mt-2 h-1 w-full rounded bg-white/10 overflow-hidden">--}}
|
|
{{-- <div class="h-full w-1/3 bg-cyan-400/60 animate-[progress_1.2s_linear_infinite]"></div>--}}
|
|
{{-- </div>--}}
|
|
{{-- @endif--}}
|
|
|
|
{{-- @if($finished)--}}
|
|
{{-- <p class="mt-1 text-xs text-gray-400">Schließt automatisch; du kannst auch schließen.</p>--}}
|
|
{{-- @endif--}}
|
|
{{-- </div>--}}
|
|
|
|
{{-- --}}{{-- Close --}}
|
|
{{-- <button class="ml-2 text-gray-400 hover:text-gray-200 transition"--}}
|
|
{{-- title="Ausblenden" wire:click="dismiss">--}}
|
|
{{-- <i class="ph ph-x"></i>--}}
|
|
{{-- </button>--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
{{-- @endif--}}
|
|
{{--<style>--}}
|
|
{{-- @keyframes progress {--}}
|
|
{{-- 0% { transform: translateX(-100%); }--}}
|
|
{{-- 100% { transform: translateX(300%); }--}}
|
|
{{-- }--}}
|
|
{{--</style>--}}
|
|
{{--</div>--}}
|
|
{{--@php--}}
|
|
{{-- $isDone = $task && ($task['status'] === 'done');--}}
|
|
{{-- $isFail = $task && ($task['status'] === 'failed');--}}
|
|
{{-- $isRun = $task && ($task['status'] === 'running');--}}
|
|
{{-- $isQueued = $task && ($task['status'] === 'queued');--}}
|
|
|
|
{{-- $statusPill = match(true) {--}}
|
|
{{-- $isDone => 'bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30',--}}
|
|
{{-- $isFail => 'bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/30',--}}
|
|
{{-- $isRun => 'bg-cyan-500/15 text-cyan-300 ring-1 ring-cyan-500/30',--}}
|
|
{{-- default => 'bg-amber-500/15 text-amber-300 ring-1 ring-amber-500/30',--}}
|
|
{{-- };--}}
|
|
{{--@endphp--}}
|
|
|
|
{{--<div--}}
|
|
{{-- @class([--}}
|
|
{{-- 'fixed z-50 w-[420px] max-w-[92vw]',--}}
|
|
{{-- $position === 'bottom-left' ? 'bottom-6 left-6' : 'top-6 right-6',--}}
|
|
{{-- ])--}}
|
|
{{-- @if(!$finished) wire:poll.3s="loadTask" @endif--}}
|
|
{{-->--}}
|
|
{{-- @if($task)--}}
|
|
{{-- <div class="glass-card border border-glass-border/70 rounded-2xl p-4 shadow-[0_10px_30px_rgba(0,0,0,.35)]">--}}
|
|
|
|
{{-- --}}{{-- Kopfzeile --}}
|
|
{{-- <div class="flex items-center justify-between gap-3">--}}
|
|
{{-- <div class="flex items-center gap-2">--}}
|
|
{{-- <span class="badge !bg-glass-light/50 !border-glass-border">--}}
|
|
{{-- {{ strtoupper($task['type']) }}--}}
|
|
{{-- </span>--}}
|
|
{{-- @if(!empty($task['payload']['domain']))--}}
|
|
{{-- <div class="text-base font-semibold text-gray-100/95 tracking-tight">--}}
|
|
{{-- {{ $task['payload']['domain'] }}--}}
|
|
{{-- </div>--}}
|
|
{{-- @endif--}}
|
|
{{-- </div>--}}
|
|
|
|
{{-- <div class="flex items-center gap-2">--}}
|
|
{{-- <span class="text-[13px] text-gray-300/80">Status</span>--}}
|
|
{{-- <span class="px-2.5 py-1 rounded-lg text-[12px] leading-none {{ $statusPill }}">--}}
|
|
{{-- @if($isDone)--}}
|
|
{{-- <i class="ph ph-check-circle text-[14px] align-[-1px]"></i>--}}
|
|
{{-- <span class="ml-1">Erledigt</span>--}}
|
|
{{-- @elseif($isFail)--}}
|
|
{{-- <i class="ph ph-x-circle text-[14px] align-[-1px]"></i>--}}
|
|
{{-- <span class="ml-1">Fehler</span>--}}
|
|
{{-- @elseif($isRun)--}}
|
|
{{-- <i class="ph ph-arrow-clockwise text-[14px] animate-spin align-[-1px]"></i>--}}
|
|
{{-- <span class="ml-1">Läuft…</span>--}}
|
|
{{-- @else--}}
|
|
{{-- <i class="ph ph-pause-circle text-[14px] align-[-1px]"></i>--}}
|
|
{{-- <span class="ml-1">Wartet…</span>--}}
|
|
{{-- @endif--}}
|
|
{{-- </span>--}}
|
|
{{-- </div>--}}
|
|
{{-- </div>--}}
|
|
|
|
{{-- --}}{{-- Nachricht / Progress --}}
|
|
{{-- @if(!empty($task['message']))--}}
|
|
{{-- <p class="mt-3 text-[15px] text-gray-200/90 leading-relaxed">--}}
|
|
{{-- {{ $task['message'] }}--}}
|
|
{{-- </p>--}}
|
|
{{-- @endif--}}
|
|
|
|
{{-- @if($isRun || $isQueued)--}}
|
|
{{-- <div class="mt-3 h-1.5 w-full rounded-full bg-white/5 overflow-hidden">--}}
|
|
{{-- <div class="h-full w-1/2 bg-cyan-400/50 animate-[progress_1.6s_ease-in-out_infinite]"></div>--}}
|
|
{{-- </div>--}}
|
|
{{-- @endif--}}
|
|
|
|
{{-- @if($finished)--}}
|
|
{{-- <p class="mt-3 text-[12px] text-gray-400">Diese Meldung verschwindet nach Aktualisierung automatisch.</p>--}}
|
|
{{-- @endif--}}
|
|
{{-- </div>--}}
|
|
{{-- @endif--}}
|
|
{{-- kleine Keyframe-Anim für die “Fortschritt”-Leiste --}}
|
|
{{--<style>--}}
|
|
{{-- @keyframes progress {--}}
|
|
{{-- 0% { transform: translateX(-60%); }--}}
|
|
{{-- 50% { transform: translateX(10%); }--}}
|
|
{{-- 100% { transform: translateX(120%); }--}}
|
|
{{-- }--}}
|
|
{{--</style>--}}
|
|
{{--</div>--}}
|