From 291f13c0344f14f375cadd2d66a37ee88fb1a45a Mon Sep 17 00:00:00 2001 From: boban Date: Thu, 23 Apr 2026 01:55:41 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Updates-Seite=20=E2=80=94=20Pr=C3=BCfung?= =?UTF-8?q?=20synchron,=20Log-Abst=C3=A4nde,=20Checkbox-Stil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 +
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 --- app/Livewire/Ui/System/UpdatePage.php | 19 ++++++++++++------- .../livewire/ui/system/update-page.blade.php | 16 ++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/app/Livewire/Ui/System/UpdatePage.php b/app/Livewire/Ui/System/UpdatePage.php index 3504957..c85b172 100644 --- a/app/Livewire/Ui/System/UpdatePage.php +++ b/app/Livewire/Ui/System/UpdatePage.php @@ -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 diff --git a/resources/views/livewire/ui/system/update-page.blade.php b/resources/views/livewire/ui/system/update-page.blade.php index 38acbe0..93c883d 100644 --- a/resources/views/livewire/ui/system/update-page.blade.php +++ b/resources/views/livewire/ui/system/update-page.blade.php @@ -162,9 +162,9 @@ Update-Log
-