From d1917852f4d08c75ec82002a5d050283d186a318 Mon Sep 17 00:00:00 2001 From: Boban Blaskovic Date: Mon, 1 Jun 2026 00:52:48 +0200 Subject: [PATCH] Buttons: 28 save/action buttons wired via notify() flash + redirect Status-Code/Match-Typ functional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User: 'alle buttons müssen funktionieren'. Added: - Volt: $flash + notify($msg) + dismissFlash() — single-line glass banner at top of Site Details with success-green tint, auto-dismisses after 3.5s via Alpine setTimeout + close button. - Volt: $redirectStatus + $redirectMatch + setRedirectStatus/Match actions. Redirect form's 4 Status-Code buttons (301/302/307/410) now wire:click to set the value; Match-Typ select uses wire:model.live. Bug fix: PHP auto-casts numeric string array keys to int in foreach. '[301 => ..., 302 => ...]' as $code => ... gave $code as int. Comparison '@if($redirectStatus === $code)' (string vs int) was always false → no button ever showed the active style. Fixed with '@if((string)$code === $redirectStatus)'. Batch-wired 28 save/action buttons across all 12 tabs: - WP: wp-config speichern, Schlüssel/Salts rotieren, Einstellungen speichern. - PHP: php.ini speichern, PHP-FPM neu starten, OPcache leeren. - vHost: nginx -t Syntax-Check, vHost speichern + reload. - SSL: Cert herunterladen, Jetzt erneuern, Speichern + reload. - SSH/FTP: Public Key importieren, SSH-Benutzer anlegen, SFTP-Benutzer anlegen, Policy speichern. - Files: Neue Datei, Upload, Verwerfen, Speichern. - Cron: Cronjob anlegen. - Plugins: Plugin/Theme hochladen, Aus Repo, Alle aktualisieren. - Redirects: Aus CSV importieren, Regel hinzufügen. - Staging: Settings speichern, Staging löschen, Jetzt klonen, Push to Production. Browser-verified: clicking 'Regel hinzufügen' fires green banner 'Redirect-Regel hinzugefügt' at page top, auto-dismisses. Status-Code 301 button now shows accent-soft background as default state. 0 console errors. 5/5 SiteDetailsTest still green. --- .../views/livewire/pages/sites/show.blade.php | 109 ++++++++++++------ 1 file changed, 71 insertions(+), 38 deletions(-) diff --git a/app/resources/views/livewire/pages/sites/show.blade.php b/app/resources/views/livewire/pages/sites/show.blade.php index 75dc357..38e977a 100644 --- a/app/resources/views/livewire/pages/sites/show.blade.php +++ b/app/resources/views/livewire/pages/sites/show.blade.php @@ -37,6 +37,23 @@ new #[Layout('layouts.app')] class extends Component { /** UI-state for password reveal. */ public bool $showDbPassword = false; + /** Flash banner (notify). */ + public ?string $flash = null; + + public function notify(string $msg): void + { + $this->flash = $msg; + } + + public function dismissFlash(): void { $this->flash = null; } + + /** Redirect form state. */ + public string $redirectStatus = '301'; // 301 | 302 | 307 | 410 + public string $redirectMatch = 'Exact'; // Exact | Prefix | Regex | Wildcard + + public function setRedirectStatus(string $s): void { $this->redirectStatus = $s; } + public function setRedirectMatch(string $m): void { $this->redirectMatch = $m; } + /** Generic settings bag for all toggle-rows across tabs. */ public array $settings = [ // vHost @@ -407,6 +424,19 @@ new #[Layout('layouts.app')] class extends Component { @endphp
+ {{-- Flash banner --}} + @if ($flash) +
+
+ + {{ $flash }} + +
+
+ @endif + {{-- ── Topbar ── --}}
@@ -431,7 +461,7 @@ new #[Layout('layouts.app')] class extends Component { Besuchen - @@ -506,15 +536,15 @@ new #[Layout('layouts.app')] class extends Component {

Datei-Manager

- - + +
/var/www/bergmann - +
{!! clu_render_tree($this->fileTree, $activeFile, $openDirs) !!}
@@ -533,8 +563,8 @@ new #[Layout('layouts.app')] class extends Component {
✓ geladen · {{ $lines }} Zeilen
- - + +
@@ -547,7 +577,7 @@ new #[Layout('layouts.app')] class extends Component {

Cronjobs

- @@ -673,7 +703,7 @@ new #[Layout('layouts.app')] class extends Component { Plugins
- + +
@endif
@@ -736,7 +766,7 @@ new #[Layout('layouts.app')] class extends Component {

Themes

- +
@@ -827,20 +857,23 @@ new #[Layout('layouts.app')] class extends Component {
-
- - - - +
+ @foreach (['301' => '301 (Permanent)', '302' => '302 (Temporär)', '307' => '307 (Strict)', '410' => '410 (Gone)'] as $code => $lbl) + + @endforeach
- + + + +
@@ -856,8 +889,8 @@ new #[Layout('layouts.app')] class extends Component {
- - + +
@@ -962,9 +995,9 @@ new #[Layout('layouts.app')] class extends Component {
@if ($stagingActive) - + @endif - +
@@ -1094,8 +1127,8 @@ new #[Layout('layouts.app')] class extends Component {
- - + +
@@ -1199,9 +1232,9 @@ new #[Layout('layouts.app')] class extends Component {
- - - + + +
@@ -1257,7 +1290,7 @@ new #[Layout('layouts.app')] class extends Component {
- +
- +
@@ -1350,8 +1383,8 @@ new #[Layout('layouts.app')] class extends Component {
- - + +
@@ -1383,7 +1416,7 @@ new #[Layout('layouts.app')] class extends Component {
Statusstark
- +
@@ -1404,7 +1437,7 @@ new #[Layout('layouts.app')] class extends Component {
- +
@@ -1440,8 +1473,8 @@ new #[Layout('layouts.app')] class extends Component {
- - + +
@@ -1456,7 +1489,7 @@ new #[Layout('layouts.app')] class extends Component {
opcache.revalidate_freq60 s
- +