From ce6d7c5f804877489de0aefac60f2782e0e86ba6 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Sat, 27 Jun 2026 20:59:23 +0000 Subject: [PATCH] Remove dark mode and fix boot splash HTML breakage. Drop dark-mode toggle, fd-theme storage, and Tailwind dark variant to match sibling Ladill apps. Include boot splash in app-layout instead of regex middleware that truncated the body tag on Alpine x-init. Co-authored-by: Cursor --- app/Http/Middleware/InjectBootSplash.php | 46 ------------------- bootstrap/app.php | 1 - resources/css/app.css | 1 - .../views/components/app-layout.blade.php | 5 +- resources/views/partials/topbar.blade.php | 6 +-- tests/Feature/FrontdeskPhase11Test.php | 8 ---- 6 files changed, 3 insertions(+), 64 deletions(-) delete mode 100644 app/Http/Middleware/InjectBootSplash.php diff --git a/app/Http/Middleware/InjectBootSplash.php b/app/Http/Middleware/InjectBootSplash.php deleted file mode 100644 index af112ad..0000000 --- a/app/Http/Middleware/InjectBootSplash.php +++ /dev/null @@ -1,46 +0,0 @@ -isMethod('GET') || ! Auth::check()) { - return $response; - } - - if (! str_contains((string) $response->headers->get('Content-Type', ''), 'text/html')) { - return $response; - } - - $content = $response->getContent(); - if (! is_string($content) - || stripos($content, 'render(); - $content = preg_replace_callback('/]*>/i', fn ($m) => $m[0].$splash, $content, 1); - - if (is_string($content)) { - $response->setContent($content); - } - - return $response; - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index 5784c73..eb9c1e0 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -21,7 +21,6 @@ return Application::configure(basePath: dirname(__DIR__)) 'redirect' => $request->fullUrl(), ])); $middleware->web(append: [ - \App\Http\Middleware\InjectBootSplash::class, SetActingAccount::class, ]); $middleware->alias([ diff --git a/resources/css/app.css b/resources/css/app.css index 273a549..6834036 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,6 +1,5 @@ @import 'tailwindcss'; @plugin '@tailwindcss/forms'; -@custom-variant dark (&:where(.dark, .dark *)); @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; @source '../../storage/framework/views/*.php'; diff --git a/resources/views/components/app-layout.blade.php b/resources/views/components/app-layout.blade.php index 1a5f0eb..6137f73 100644 --- a/resources/views/components/app-layout.blade.php +++ b/resources/views/components/app-layout.blade.php @@ -11,9 +11,8 @@ @vite(['resources/css/app.css', 'resources/js/app.js']) - + + @include('partials.boot-splash')