diff --git a/app/resources/css/app.css b/app/resources/css/app.css index 867ee0c..43bacc2 100644 --- a/app/resources/css/app.css +++ b/app/resources/css/app.css @@ -1404,12 +1404,14 @@ /* Pure switch toggle (no checkbox) */ .clu-toggle { + display: inline-block; position: relative; flex: none; width: 36px; height: 20px; background: rgba(30,35,60,0.20); border-radius: 999px; cursor: pointer; transition: background .18s; + vertical-align: middle; } .clu-toggle::after { content: ""; diff --git a/app/resources/views/livewire/pages/sites/show.blade.php b/app/resources/views/livewire/pages/sites/show.blade.php index 13c58f9..4fc77ad 100644 --- a/app/resources/views/livewire/pages/sites/show.blade.php +++ b/app/resources/views/livewire/pages/sites/show.blade.php @@ -34,6 +34,56 @@ new #[Layout('layouts.app')] class extends Component { public bool $stagingExcludeMedia = false; public string $stagingLastSync = '2026-05-31 14:22'; + /** Generic settings bag for all toggle-rows across tabs. */ + public array $settings = [ + // vHost + 'vhost.server_tokens' => true, + 'vhost.http2_push' => false, + // SSL + 'ssl.ocsp' => true, + 'ssl.auto_renew' => true, + 'ssl.caa_check' => true, + 'ssl.ct_log' => true, + // SSH/FTP + 'access.password_auth' => true, // password-auth DISABLED toggle + 'access.no_root' => true, + 'access.fail2ban' => true, + 'access.ip_allowlist' => false, + 'access.ssh_2fa' => false, + // Plugins + 'wp.auto.security' => true, + 'wp.auto.minor' => true, + 'wp.auto.major' => false, + 'wp.auto.snapshot' => true, + 'wp.auto.staging_first' => false, + // Redirects new-rule form + 'redirect.keep_qs' => true, + 'redirect.case_insens' => false, + // Staging + 'staging.robots_block' => true, + 'staging.email_sandbox' => true, + 'staging.payments_test' => true, + // Plugin auto-update flags (per slug) + 'plugin.wordpress-seo.auto' => true, + 'plugin.woocommerce.auto' => false, + 'plugin.wp-rocket.auto' => true, + 'plugin.wordfence.auto' => true, + 'plugin.advanced-custom-fields.auto' => false, + 'plugin.contact-form-7.auto' => true, + 'plugin.akismet.auto' => true, + 'plugin.updraftplus.auto' => false, + ]; + + public function toggleSetting(string $key): void + { + $this->settings[$key] = ! ($this->settings[$key] ?? false); + } + + public function isOn(string $key): bool + { + return (bool) ($this->settings[$key] ?? false); + } + /** Plugin / theme registry — mocked, would come from WP-API in prod. */ public function getPluginsProperty(): array { @@ -640,7 +690,9 @@ new #[Layout('layouts.app')] class extends Component { @else inaktiv@endif