From 585ea4ad2098b486b9acad49e12e91fb26352c61 Mon Sep 17 00:00:00 2001 From: 199ocero <199ocero@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:42:02 +0000 Subject: [PATCH] Fix styling --- src/Pages/FilaChat.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Pages/FilaChat.php b/src/Pages/FilaChat.php index 2b7b4ac..9089eea 100644 --- a/src/Pages/FilaChat.php +++ b/src/Pages/FilaChat.php @@ -25,9 +25,10 @@ public static function getNavigationLabel(): string return __(config('filachat.navigation_label')); } - public static function getNavigationBadgeColor(): string|array|null + public static function getNavigationBadgeColor(): string | array | null { $count = intval(self::getNavigationBadge()); + return $count > 0 ? 'danger' : parent::getNavigationBadgeColor(); } @@ -38,10 +39,11 @@ public static function getNavigationBadge(): ?string ->where('last_read_at', null) ->where('receiverable_id', auth()->id())->count(); } + return parent::getNavigationBadge(); } - public static function getNavigationIcon(): string|Htmlable|null + public static function getNavigationIcon(): string | Htmlable | null { return config('filachat.navigation_icon'); } @@ -70,12 +72,12 @@ public function getTitle(): string return __(config('filachat.navigation_label')); } - public function getMaxContentWidth(): MaxWidth|string|null + public function getMaxContentWidth(): MaxWidth | string | null { return config('filachat.max_content_width'); } - public function getHeading(): string|Htmlable + public function getHeading(): string | Htmlable { return ''; // should be empty by default }