diff --git a/resources/views/auth/login-two-factor.blade.php b/resources/views/auth/login-two-factor.blade.php index 7982ebf..ba1ac73 100644 --- a/resources/views/auth/login-two-factor.blade.php +++ b/resources/views/auth/login-two-factor.blade.php @@ -9,7 +9,7 @@ @endif
@csrf - +
@@ -17,7 +17,7 @@ {{ $this->form }}
- + {{ __('Login') }}
diff --git a/src/TwoFactorAuthServiceProvider.php b/src/TwoFactorAuthServiceProvider.php index 9dd2d79..c8feecf 100644 --- a/src/TwoFactorAuthServiceProvider.php +++ b/src/TwoFactorAuthServiceProvider.php @@ -2,11 +2,14 @@ namespace Vormkracht10\TwoFactorAuth; +use Filament\Facades\Filament; use Filament\Support\Assets\AlpineComponent; use Filament\Support\Assets\Asset; use Filament\Support\Assets\Css; use Filament\Support\Assets\Js; +use Filament\Support\Colors\Color; use Filament\Support\Facades\FilamentAsset; +use Filament\Support\Facades\FilamentColor; use Filament\Support\Facades\FilamentIcon; use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Filesystem\Filesystem; @@ -128,6 +131,15 @@ public function packageBooted(): void $this->getAssetPackageName() ); + $colors = Filament::getCurrentPanel()?->getColors(); + $color = isset($colors['primary']) + ? (is_string($colors['primary']) ? Color::hex($colors['primary']) : $colors['primary']) + : \Filament\Support\Colors\Color::Amber; + + FilamentColor::register([ + 'default' => $color, + ]); + FilamentAsset::registerScriptData( $this->getScriptData(), $this->getAssetPackageName()