Fix: Updates-Seite — Prüfung synchron, Log-Abstände, Checkbox-Stil

- checkForUpdates() läuft jetzt synchron (nicht im Hintergrund), damit
  das Ergebnis sofort angezeigt wird ohne Seite neu laden zu müssen
- Log-Viewer: white-space:pre-wrap + <br> entfernt durch display:block
  pro Span — kein doppelter Zeilenabstand mehr
- Auto-Scroll Checkbox nutzt jetzt mw-modal-check Klassen (passend zum Design)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main v1.1.140
boban 2026-04-23 01:55:41 +02:00
parent 2049057f7f
commit 291f13c034
2 changed files with 18 additions and 17 deletions

View File

@ -61,16 +61,21 @@ class UpdatePage extends Component
public function checkForUpdates(): void
{
@shell_exec('nohup php /var/www/mailwolt/artisan mailwolt:check-updates >/dev/null 2>&1 &');
// Give the process a tiny head-start, then reload versions
usleep(500_000);
@shell_exec('php ' . base_path('artisan') . ' mailwolt:check-updates 2>&1');
$this->reloadVersionsAndStatus();
$this->recompute();
$this->dispatch('toast', type: 'done', badge: 'Updates',
title: 'Prüfung gestartet',
text: 'Update-Prüfung läuft im Hintergrund. Bitte in einigen Sekunden neu laden.',
duration: 4000);
if ($this->hasUpdate) {
$this->dispatch('toast', type: 'done', badge: 'Updates',
title: 'Update verfügbar',
text: "Version {$this->displayLatest} ist verfügbar.",
duration: 4000);
} else {
$this->dispatch('toast', type: 'done', badge: 'Updates',
title: 'Alles aktuell',
text: 'Es sind keine Updates verfügbar.',
duration: 3000);
}
}
public function runUpdate(): void

View File

@ -162,9 +162,9 @@
<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:5px;font-size:11.5px;color:var(--mw-t4);cursor:pointer">
<input type="checkbox" x-model="autoScroll" style="accent-color:var(--mw-v2)">
Auto-Scroll
<label class="mw-modal-check" style="font-size:11.5px">
<input type="checkbox" x-model="autoScroll">
<span class="mw-modal-check-label" style="font-size:11.5px;color:var(--mw-t4)">Auto-Scroll</span>
</label>
<button wire:click="clearLog"
wire:loading.attr="disabled"
@ -178,12 +178,11 @@
</div>
<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.6;white-space:pre-wrap;word-break:break-all">
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
@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';
@ -194,10 +193,7 @@
} elseif (str_contains($line, '=====')) {
$color = 'rgba(14,165,233,.8)';
}
@endphp
<span style="color:{{ $color }}">{{ $line }}</span>
<br>
@endforeach
@endphp<span style="display:block;color:{{ $color }}">{{ $line }}</span>@endforeach
@endif
</div>
<div style="margin-top:6px;font-size:11px;color:var(--mw-t5)">