From 2239c5392e8c2afd266be53464a95faf5c747ac7 Mon Sep 17 00:00:00 2001 From: Manoj Hortulanus Date: Thu, 19 Dec 2024 13:39:03 +0100 Subject: [PATCH] wip --- src/TwoFactorAuthServiceProvider.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/TwoFactorAuthServiceProvider.php b/src/TwoFactorAuthServiceProvider.php index 2516531..eb4387b 100644 --- a/src/TwoFactorAuthServiceProvider.php +++ b/src/TwoFactorAuthServiceProvider.php @@ -131,18 +131,12 @@ public function packageBooted(): void ); $colors = filament()->getCurrentPanel()->getColors(); - if (isset($colors['primary'])) { - if (is_string($colors['primary'])) { - $color = Color::hex($colors['primary']); - } else { - $color = $colors['primary']; - } - } else { - $color = \Filament\Support\Colors\Color::Amber; - } + $color = isset($colors['primary']) + ? (is_string($colors['primary']) ? Color::hex($colors['primary']) : $colors['primary']) + : \Filament\Support\Colors\Color::Amber; FilamentColor::register([ - 'default' => $color + 'default' => $color, ]);