UI: Update-Seite im korrekten mw-Design – 2-spaltig, responsiv
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main v1.1.357
parent
0375aed2ce
commit
32a3b51b2a
|
|
@ -40,179 +40,182 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ═══ Version Hero ═══ --}}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 mb-4">
|
||||
<div class="mbx-sections">
|
||||
|
||||
{{-- Installierte Version --}}
|
||||
<div class="rounded-xl border border-[var(--mw-b2)] bg-[var(--mw-bg3)] p-4 flex items-center gap-4">
|
||||
<div class="shrink-0 w-10 h-10 rounded-xl flex items-center justify-center bg-[var(--mw-bg4)] border border-[var(--mw-b2)]">
|
||||
<svg width="18" height="18" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="12" height="12" rx="2.5" stroke="var(--mw-t3)" stroke-width="1.3"/><path d="M5 8h6M5 5.5h6M5 10.5h4" stroke="var(--mw-t3)" stroke-width="1.2" stroke-linecap="round"/></svg>
|
||||
</div>
|
||||
<div class="min-w-0">
|
||||
<div class="text-[11px] text-[var(--mw-t4)] font-medium uppercase tracking-wide mb-0.5">Installiert</div>
|
||||
<div class="font-mono text-[15px] font-semibold text-[var(--mw-t1)] truncate">{{ $displayCurrent ?? '—' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- ═══ Version + Status (2-spaltig) ═══ --}}
|
||||
<div class="mw-update-grid" style="display:grid;grid-template-columns:1fr 1fr;gap:14px">
|
||||
|
||||
{{-- Verfügbare Version --}}
|
||||
<div class="rounded-xl border @if($hasUpdate) border-amber-500/30 bg-amber-500/5 @else border-[var(--mw-b2)] bg-[var(--mw-bg3)] @endif p-4 flex items-center gap-4">
|
||||
<div class="shrink-0 w-10 h-10 rounded-xl flex items-center justify-content-center flex items-center justify-center @if($hasUpdate) bg-amber-500/10 border border-amber-500/30 @else bg-[var(--mw-bg4)] border border-[var(--mw-b2)] @endif">
|
||||
<svg width="18" height="18" viewBox="0 0 16 16" fill="none"><path d="M8 2a6 6 0 1 1-4.24 1.76" stroke="{{ $hasUpdate ? '#fbbf24' : 'var(--mw-t3)' }}" stroke-width="1.3" stroke-linecap="round"/><path d="M2 2v3.5H5.5" stroke="{{ $hasUpdate ? '#fbbf24' : 'var(--mw-t3)' }}" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</div>
|
||||
<div class="min-w-0">
|
||||
<div class="text-[11px] @if($hasUpdate) text-amber-400/70 @else text-[var(--mw-t4)] @endif font-medium uppercase tracking-wide mb-0.5">Verfügbar</div>
|
||||
<div class="font-mono text-[15px] font-semibold @if($hasUpdate) text-amber-300 @else text-[var(--mw-t1)] @endif truncate">
|
||||
{{ $displayLatest ?? ($hasUpdate ? '—' : $displayCurrent ?? '—') }}
|
||||
{{-- Versionen --}}
|
||||
<div class="mbx-section" style="margin:0">
|
||||
<div class="mbx-domain-head">
|
||||
<div class="mbx-domain-info">
|
||||
<span class="mbx-badge-mute">Versionsinformation</span>
|
||||
</div>
|
||||
@if($state === 'running')
|
||||
<span style="font-size:10.5px;padding:2px 8px;border-radius:9px;background:rgba(14,165,233,.1);border:1px solid rgba(14,165,233,.3);color:#7dd3fc;font-weight:600">Update läuft …</span>
|
||||
@elseif($rc !== null && $rc !== 0)
|
||||
<span class="mbx-badge-warn">Fehler (rc={{ $rc }})</span>
|
||||
@elseif($hasUpdate)
|
||||
<span class="mbx-badge-warn">Update verfügbar</span>
|
||||
@else
|
||||
<span class="mbx-badge-ok">Aktuell</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Status --}}
|
||||
<div class="rounded-xl border sm:col-span-2 lg:col-span-1
|
||||
@if($state === 'running') border-sky-500/30 bg-sky-500/5
|
||||
@elseif($rc !== null && $rc !== 0) border-red-500/30 bg-red-500/5
|
||||
@elseif($rc === 0) border-emerald-500/30 bg-emerald-500/5
|
||||
@elseif($hasUpdate) border-amber-500/30 bg-amber-500/5
|
||||
@else border-emerald-500/20 bg-emerald-500/5
|
||||
@endif p-4 flex items-center gap-4">
|
||||
<div class="shrink-0 w-10 h-10 rounded-xl flex items-center justify-center
|
||||
@if($state === 'running') bg-sky-500/10 border border-sky-500/30
|
||||
@elseif($rc !== null && $rc !== 0) bg-red-500/10 border border-red-500/30
|
||||
@elseif($rc === 0) bg-emerald-500/10 border border-emerald-500/30
|
||||
@elseif($hasUpdate) bg-amber-500/10 border border-amber-500/30
|
||||
@else bg-emerald-500/10 border border-emerald-500/20
|
||||
@endif">
|
||||
@if($state === 'running')
|
||||
<svg class="animate-spin" width="18" height="18" viewBox="0 0 16 16" fill="none"><path d="M8 2a6 6 0 1 1-4.24 1.76" stroke="#7dd3fc" stroke-width="1.4" stroke-linecap="round"/><path d="M2 2v3.5H5.5" stroke="#7dd3fc" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
@elseif($rc !== null && $rc !== 0)
|
||||
<svg width="18" height="18" viewBox="0 0 14 14" fill="none"><path d="M7 1L13 12H1L7 1Z" stroke="#f87171" stroke-width="1.3" stroke-linejoin="round"/><path d="M7 5.5v3" stroke="#f87171" stroke-width="1.3" stroke-linecap="round"/><circle cx="7" cy="10" r=".7" fill="#f87171"/></svg>
|
||||
@elseif($rc === 0)
|
||||
<svg width="18" height="18" viewBox="0 0 12 12" fill="none"><path d="M2 6.5l2.5 2.5 5.5-5.5" stroke="#22c55e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
@elseif($hasUpdate)
|
||||
<svg width="18" height="18" viewBox="0 0 14 14" fill="none"><path d="M7 2v8M4 7l3 3 3-3" stroke="#fbbf24" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
@else
|
||||
<svg width="18" height="18" viewBox="0 0 12 12" fill="none"><path d="M2 6.5l2.5 2.5 5.5-5.5" stroke="#22c55e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
@endif
|
||||
</div>
|
||||
<div class="min-w-0">
|
||||
<div class="text-[11px] font-medium uppercase tracking-wide mb-0.5
|
||||
@if($state === 'running') text-sky-400/70
|
||||
@elseif($rc !== null && $rc !== 0) text-red-400/70
|
||||
@elseif($rc === 0 || !$hasUpdate) text-emerald-400/70
|
||||
@else text-amber-400/70
|
||||
@endif">Status</div>
|
||||
<div class="text-[13.5px] font-semibold truncate
|
||||
@if($state === 'running') text-sky-300
|
||||
@elseif($rc !== null && $rc !== 0) text-red-300
|
||||
@elseif($rc === 0) text-emerald-300
|
||||
@elseif($hasUpdate) text-amber-300
|
||||
@else text-emerald-300
|
||||
@endif">
|
||||
@if($state === 'running') Update läuft …
|
||||
@elseif($rc !== null && $rc !== 0) Fehlgeschlagen (rc={{ $rc }})
|
||||
@elseif($rc === 0) Erfolgreich installiert
|
||||
@elseif($hasUpdate) Update verfügbar
|
||||
@else Aktuell
|
||||
<div style="padding:16px 18px;display:flex;flex-direction:column;gap:14px">
|
||||
<div style="display:flex;align-items:center;gap:12px">
|
||||
<div style="width:36px;height:36px;border-radius:8px;background:var(--mw-bg4);border:1px solid var(--mw-b2);display:flex;align-items:center;justify-content:center;flex-shrink:0">
|
||||
<svg width="15" height="15" viewBox="0 0 14 14" fill="none"><rect x="1.5" y="1.5" width="11" height="11" rx="2" stroke="var(--mw-t3)" stroke-width="1.2"/><path d="M4 7h6M4 4.5h6M4 9.5h3.5" stroke="var(--mw-t3)" stroke-width="1.1" stroke-linecap="round"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:10.5px;color:var(--mw-t4);margin-bottom:2px">Installierte Version</div>
|
||||
<div style="font-family:monospace;font-size:14px;font-weight:600;color:var(--mw-t1)">{{ $displayCurrent ?? '—' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:1px;background:var(--mw-b1)"></div>
|
||||
<div style="display:flex;align-items:center;gap:12px">
|
||||
<div style="width:36px;height:36px;border-radius:8px;background:{{ $hasUpdate ? 'rgba(234,179,8,.1)' : 'var(--mw-bg4)' }};border:1px solid {{ $hasUpdate ? 'rgba(234,179,8,.3)' : 'var(--mw-b2)' }};display:flex;align-items:center;justify-content:center;flex-shrink:0">
|
||||
<svg width="15" height="15" viewBox="0 0 14 14" fill="none"><path d="M7 1.5A5.5 5.5 0 1 1 1.5 7" stroke="{{ $hasUpdate ? '#fbbf24' : 'var(--mw-t3)' }}" stroke-width="1.2" stroke-linecap="round"/><path d="M1.5 2v3.5H5" stroke="{{ $hasUpdate ? '#fbbf24' : 'var(--mw-t3)' }}" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:10.5px;color:var(--mw-t4);margin-bottom:2px">Verfügbare Version</div>
|
||||
<div style="font-family:monospace;font-size:14px;font-weight:600;color:{{ $hasUpdate ? '#fbbf24' : 'var(--mw-t1)' }}">
|
||||
{{ $displayLatest ?? ($displayCurrent ?? '—') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if(!$hasUpdate && $displayCurrent)
|
||||
<div style="display:flex;align-items:center;gap:7px;font-size:11.5px;color:rgba(34,197,94,.75)">
|
||||
<svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 6.5l2.5 2.5 5.5-5.5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
Du bist auf dem neuesten Stand.
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Status + Fortschritt --}}
|
||||
<div class="mbx-section" style="margin:0">
|
||||
<div class="mbx-domain-head">
|
||||
<div class="mbx-domain-info">
|
||||
<span class="mbx-badge-mute">Update-Status</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:16px 18px;display:flex;flex-direction:column;gap:14px">
|
||||
|
||||
@if($state === 'running')
|
||||
<div style="display:flex;align-items:center;gap:12px">
|
||||
<div style="width:36px;height:36px;border-radius:50%;background:rgba(14,165,233,.1);border:1px solid rgba(14,165,233,.3);display:flex;align-items:center;justify-content:center;flex-shrink:0;animation:spin 1.5s linear infinite">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2a6 6 0 1 1-4.24 1.76" stroke="#7dd3fc" stroke-width="1.4" stroke-linecap="round"/><path d="M2 2v3.5H5.5" stroke="#7dd3fc" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</div>
|
||||
<div>
|
||||
<div style="font-size:13px;font-weight:600;color:var(--mw-t1)">Update wird installiert …</div>
|
||||
<div style="font-size:11.5px;color:var(--mw-t4);margin-top:2px">Bitte nicht unterbrechen.</div>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($rc !== null && $rc !== 0)
|
||||
<div style="display:flex;align-items:flex-start;gap:10px;padding:12px 14px;background:rgba(239,68,68,.07);border:1px solid rgba(239,68,68,.25);border-radius:8px">
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;margin-top:1px;color:#f87171"><path d="M7 1L13 12H1L7 1Z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/><path d="M7 5.5v3" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/><circle cx="7" cy="10" r=".7" fill="currentColor"/></svg>
|
||||
<div>
|
||||
<div style="font-size:12.5px;font-weight:600;color:#f87171">Fehlgeschlagen (rc={{ $rc }})</div>
|
||||
<div style="font-size:11.5px;color:var(--mw-t4);margin-top:3px">Bitte das Log prüfen.</div>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($rc === 0)
|
||||
<div style="display:flex;align-items:center;gap:10px;padding:12px 14px;background:rgba(34,197,94,.06);border:1px solid rgba(34,197,94,.2);border-radius:8px">
|
||||
<svg width="14" height="14" viewBox="0 0 12 12" fill="none" style="color:#22c55e;flex-shrink:0"><path d="M2 6.5l2.5 2.5 5.5-5.5" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<span style="font-size:12.5px;color:rgba(34,197,94,.9)">Update erfolgreich abgeschlossen.</span>
|
||||
</div>
|
||||
@else
|
||||
<div style="font-size:12.5px;color:var(--mw-t4)">Kein Update aktiv. Klicke "Auf Updates prüfen" um die neueste Version zu ermitteln.</div>
|
||||
@endif
|
||||
|
||||
@if($state === 'running' || $progressPct > 0)
|
||||
<div>
|
||||
<div style="display:flex;justify-content:space-between;margin-bottom:5px">
|
||||
<span style="font-size:11px;color:var(--mw-t4)">Fortschritt</span>
|
||||
<span style="font-size:11px;color:var(--mw-t4);font-family:monospace">{{ $progressPct }}%</span>
|
||||
</div>
|
||||
<div style="height:6px;background:var(--mw-bg4);border-radius:4px;overflow:hidden;border:1px solid var(--mw-b2)">
|
||||
<div style="height:100%;width:{{ $progressPct }}%;transition:width .6s ease;background:{{ $rc !== null && $rc !== 0 ? 'rgba(239,68,68,.7)' : ($progressPct >= 100 ? 'rgba(34,197,94,.8)' : 'rgba(14,165,233,.8)') }};border-radius:4px"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- ═══ Progress Bar (nur während Update) ═══ --}}
|
||||
@if($state === 'running' || $progressPct > 0)
|
||||
<div class="mbx-section mb-4">
|
||||
<div class="p-4">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-[12px] font-medium text-[var(--mw-t3)]">
|
||||
@if($state === 'running') Installation läuft … @else Abgeschlossen @endif
|
||||
</span>
|
||||
<span class="font-mono text-[11px] text-[var(--mw-t4)]">{{ $progressPct }}%</span>
|
||||
{{-- ═══ Log Viewer ═══ --}}
|
||||
<div class="mbx-section"
|
||||
x-data="{
|
||||
autoScroll: true,
|
||||
init() {
|
||||
this.$watch('$wire.logLines', () => {
|
||||
if (this.autoScroll && this.$refs.logBox) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.logBox.scrollTop = this.$refs.logBox.scrollHeight;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}">
|
||||
<div class="mbx-domain-head">
|
||||
<div class="mbx-domain-info">
|
||||
<span class="mbx-badge-mute">Update-Log</span>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;gap:8px">
|
||||
<label style="display:flex;align-items:center;gap:7px;cursor:pointer;user-select:none">
|
||||
<span x-on:click="autoScroll=!autoScroll"
|
||||
style="position:relative;display:inline-block;width:28px;height:16px;flex-shrink:0">
|
||||
<span :style="autoScroll ? 'background:var(--mw-v);border-color:var(--mw-v)' : 'background:var(--mw-bg4);border-color:var(--mw-b2)'"
|
||||
style="position:absolute;inset:0;border-radius:8px;border:1px solid var(--mw-b2);transition:background .2s,border-color .2s"></span>
|
||||
<span :style="autoScroll ? 'left:14px' : 'left:2px'"
|
||||
style="position:absolute;top:2px;width:10px;height:10px;border-radius:50%;background:white;transition:left .2s;box-shadow:0 1px 3px rgba(0,0,0,.4)"></span>
|
||||
</span>
|
||||
<span style="font-size:11.5px;color:var(--mw-t4)">Auto-Scroll</span>
|
||||
</label>
|
||||
<button wire:click="clearLog"
|
||||
wire:loading.attr="disabled"
|
||||
wire:target="clearLog"
|
||||
class="mbx-btn-mute"
|
||||
style="font-size:11px;padding:3px 10px">
|
||||
<svg width="11" height="11" viewBox="0 0 14 14" fill="none"><path d="M2 4h10M5 4V2.5h4V4M11.5 4l-.5 8H3L2.5 4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
Log leeren
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-1.5 rounded-full bg-[var(--mw-bg4)] border border-[var(--mw-b2)] overflow-hidden">
|
||||
<div class="h-full rounded-full transition-all duration-500
|
||||
@if($rc !== null && $rc !== 0) bg-red-500/70
|
||||
@elseif($progressPct >= 100) bg-emerald-500/80
|
||||
@else bg-sky-500/80
|
||||
@endif"
|
||||
style="width:{{ $progressPct }}%"></div>
|
||||
</div>
|
||||
@if($state === 'running')
|
||||
<p class="text-[11px] text-[var(--mw-t4)] mt-2">Bitte nicht unterbrechen — die Seite aktualisiert sich automatisch.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- ═══ Log Viewer ═══ --}}
|
||||
<div class="mbx-section"
|
||||
x-data="{
|
||||
autoScroll: true,
|
||||
init() {
|
||||
this.$watch('$wire.logLines', () => {
|
||||
if (this.autoScroll && this.$refs.logBox) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.logBox.scrollTop = this.$refs.logBox.scrollHeight;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}">
|
||||
<div class="mbx-domain-head">
|
||||
<div class="mbx-domain-info">
|
||||
<span class="mbx-badge-mute">Update-Log</span>
|
||||
<span class="text-[11px] text-[var(--mw-t5)] hidden sm:inline">/var/log/mailwolt-update.log</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
{{-- Auto-Scroll Toggle --}}
|
||||
<label class="flex items-center gap-2 cursor-pointer select-none">
|
||||
<span x-on:click="autoScroll=!autoScroll" class="relative inline-block w-7 h-4 shrink-0">
|
||||
<span :style="autoScroll ? 'background:var(--mw-v);border-color:var(--mw-v)' : 'background:var(--mw-bg4);border-color:var(--mw-b2)'"
|
||||
class="absolute inset-0 rounded-full border transition-all duration-200"></span>
|
||||
<span :style="autoScroll ? 'left:14px' : 'left:2px'"
|
||||
class="absolute top-0.5 w-2.5 h-2.5 rounded-full bg-white shadow-sm transition-all duration-200"></span>
|
||||
</span>
|
||||
<span class="text-[11.5px] text-[var(--mw-t4)]">Auto-Scroll</span>
|
||||
</label>
|
||||
|
||||
<button wire:click="clearLog"
|
||||
wire:loading.attr="disabled"
|
||||
wire:target="clearLog"
|
||||
class="mbx-btn-mute"
|
||||
style="font-size:11px;padding:3px 10px">
|
||||
<svg width="11" height="11" viewBox="0 0 14 14" fill="none"><path d="M2 4h10M5 4V2.5h4V4M11.5 4l-.5 8H3L2.5 4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
Log leeren
|
||||
</button>
|
||||
<div style="padding:12px 14px">
|
||||
<div x-ref="logBox"
|
||||
style="background:var(--mw-bg3);border:1px solid var(--mw-b2);border-radius:7px;padding:12px 14px;max-height:400px;overflow-y:auto;font-family:monospace;font-size:11.5px;color:var(--mw-t3);line-height:1.55">
|
||||
@if(count($logLines) === 0)
|
||||
<span style="color:var(--mw-t5);font-style:italic">Keine Log-Einträge vorhanden.</span>
|
||||
@else
|
||||
@foreach($logLines as $line)@php
|
||||
$color = 'inherit';
|
||||
if (str_contains($line, '[!]') || str_contains($line, 'error') || str_contains($line, 'Error') || str_contains($line, 'fehlgeschlagen')) {
|
||||
$color = '#f87171';
|
||||
} elseif (str_contains($line, '[✓]') || str_contains($line, 'beendet') || str_contains($line, 'abgeschlossen')) {
|
||||
$color = 'rgba(34,197,94,.85)';
|
||||
} elseif (str_contains($line, '[i]')) {
|
||||
$color = 'var(--mw-t3)';
|
||||
} elseif (str_contains($line, '=====')) {
|
||||
$color = 'rgba(14,165,233,.8)';
|
||||
}
|
||||
@endphp<span style="display:block;color:{{ $color }}">{{ $line }}</span>@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div style="margin-top:6px;font-size:11px;color:var(--mw-t5)">
|
||||
{{ count($logLines) }} Zeilen · /var/log/mailwolt-update.log
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-3">
|
||||
<div x-ref="logBox"
|
||||
class="rounded-lg border border-[var(--mw-b2)] bg-[var(--mw-bg3)] p-3 font-mono text-[11.5px] leading-relaxed overflow-y-auto"
|
||||
style="max-height:420px;min-height:80px">
|
||||
@if(count($logLines) === 0)
|
||||
<span class="text-[var(--mw-t5)] italic">Keine Log-Einträge vorhanden.</span>
|
||||
@else
|
||||
@foreach($logLines as $line)@php
|
||||
$color = 'var(--mw-t3)';
|
||||
if (str_contains($line, '[!]') || str_contains($line, 'error') || str_contains($line, 'Error') || str_contains($line, 'fehlgeschlagen')) {
|
||||
$color = '#f87171';
|
||||
} elseif (str_contains($line, '[✓]') || str_contains($line, 'beendet') || str_contains($line, 'abgeschlossen')) {
|
||||
$color = 'rgba(34,197,94,.85)';
|
||||
} elseif (str_contains($line, '[i]')) {
|
||||
$color = 'var(--mw-t3)';
|
||||
} elseif (str_contains($line, '=====')) {
|
||||
$color = 'rgba(14,165,233,.7)';
|
||||
}
|
||||
@endphp<span class="block" style="color:{{ $color }}">{{ $line }}</span>@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div class="mt-2 flex items-center justify-between">
|
||||
<span class="text-[11px] text-[var(--mw-t5)]">{{ count($logLines) }} Zeilen</span>
|
||||
<span class="text-[11px] text-[var(--mw-t5)] sm:hidden">/var/log/mailwolt-update.log</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@media (max-width: 640px) {
|
||||
.mw-update-grid { grid-template-columns: 1fr !important; }
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue