primary color based on Sport smaler sport icons
This commit is contained in:
1 parent
f7298e3ca7
commit
24de0e93a7
10 files changed
+47
-18
No files matched your search
@@ -9,6 +9,7 @@ use Filament\Support\Facades\FilamentColor;
|
||||
use Filament\Support\Facades\FilamentView;
|
||||
use Filament\Tables\View\TablesRenderHook;
|
||||
use Filament\View\PanelsRenderHook;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -43,14 +44,36 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
Carbon::setLocale(app()->getLocale());
|
||||
|
||||
FilamentColor::register([
|
||||
'danger' => Color::Red,
|
||||
'gray' => Color::Zinc,
|
||||
'primary' => Color::Blue,
|
||||
'success' => Color::Green,
|
||||
'warning' => Color::Yellow,
|
||||
'info' => Color::Fuchsia,
|
||||
]);
|
||||
view()->composer('*', function ($view) {
|
||||
$sport_id = Auth::user()->sport_id;
|
||||
|
||||
switch ($sport_id) {
|
||||
case 1:
|
||||
FilamentColor::register(['primary' => Color::Blue]);
|
||||
break;
|
||||
case 2:
|
||||
FilamentColor::register(['primary' => Color::Slate]);
|
||||
break;
|
||||
case 3:
|
||||
FilamentColor::register(['primary' => Color::Red]);
|
||||
break;
|
||||
case 5:
|
||||
FilamentColor::register(['primary' => Color::Yellow]);
|
||||
break;
|
||||
default:
|
||||
FilamentColor::register(['primary' => Color::Blue]);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// FilamentColor::register([
|
||||
// 'danger' => Color::Red,
|
||||
// 'gray' => Color::Zinc,
|
||||
// 'primary' => Color::Blue,
|
||||
// 'success' => Color::Green,
|
||||
// 'warning' => Color::Yellow,
|
||||
// 'info' => Color::Fuchsia,
|
||||
// ]);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user