From a277ab273b751f639425a3c9003b241dd4cbb62f Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Sat, 11 May 2024 12:18:32 +0300 Subject: [PATCH] update --- .drone.yml | 4 ++-- web/app/Providers/Filament/AdminPanelProvider.php | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index d2dcc1f..375f88e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,8 +1,8 @@ --- kind: pipeline -name: Ubuntu 22.04 - CODE COVERAGE +name: Ubuntu 22.04 - Unit Test & Code Coverage steps: - - name: run unit tests + - name: run & upload code coverage image: ubuntu:22.04 environment: CODECOV_TOKEN: diff --git a/web/app/Providers/Filament/AdminPanelProvider.php b/web/app/Providers/Filament/AdminPanelProvider.php index 1ddc464..e5d59e6 100644 --- a/web/app/Providers/Filament/AdminPanelProvider.php +++ b/web/app/Providers/Filament/AdminPanelProvider.php @@ -35,15 +35,18 @@ class AdminPanelProvider extends PanelProvider { public function panel(Panel $panel): Panel { + if (auth()->check()) { + $panel->renderHook( + name: PanelsRenderHook::BODY_START, + hook: fn (): string => Blade::render('@livewire(\'jobs-queue-notifications\')') + ); + } + $panel->default() ->darkMode(true) ->id('admin') ->path('admin') ->login() - ->renderHook( - name: PanelsRenderHook::BODY_START, - hook: fn (): string => Blade::render('@livewire(\'jobs-queue-notifications\')') - ) ->renderHook( name: PanelsRenderHook::TOPBAR_START, hook: fn (): string => Blade::render('@livewire(\'quick-service-restart-menu\')')