Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Dec 19, 2024
1 parent 13a1b43 commit 7c15c5f
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/TwoFactorAuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,9 @@ 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,
Expand Down Expand Up @@ -188,7 +182,7 @@ public function packageBooted(): void
* This route name is used multiple places in filament.
*/
Route::prefix(config('filament.path'))->group(function () {
Route::get('/filament-login', fn () => Redirect::route('login'))
Route::get('/filament-login', fn() => Redirect::route('login'))
->name('auth.login');
});
});
Expand Down

0 comments on commit 7c15c5f

Please sign in to comment.