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,4 +9,6 @@ use Filament\Support\Icons\Heroicon;
|
||||
class AdministratorCluster extends Cluster
|
||||
{
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSquares2x2;
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
}
|
||||
@@ -9,4 +9,6 @@ use Filament\Support\Icons\Heroicon;
|
||||
class SettingsCluster extends Cluster
|
||||
{
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::AdjustmentsHorizontal;
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
}
|
||||
@@ -19,7 +19,6 @@ use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Support\Enums\FontWeight;
|
||||
use Filament\Support\Enums\IconSize;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
@@ -45,11 +44,11 @@ class EventsTable
|
||||
->columns([
|
||||
IconColumn::make('sport.icon')
|
||||
->label('')
|
||||
->color('primary')
|
||||
->width('1rem')
|
||||
->size(IconSize::ExtraLarge)
|
||||
->icon(fn ($record) => $record->sport->icon)
|
||||
->tooltip(fn ($record) => $record->id),
|
||||
// MatchIds::make('match_ids'),
|
||||
MatchIds::make('match_ids'),
|
||||
TextColumn::make('id')->hidden()->searchable(),
|
||||
TextColumn::make('betsapi_id')->hidden()->searchable(),
|
||||
TextColumn::make('betradar_id')->hidden()->searchable(),
|
||||
|
||||
@@ -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,
|
||||
// ]);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ class AdminPanelProvider extends PanelProvider
|
||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages')
|
||||
->discoverClusters(in: app_path('Filament/Clusters'), for: 'App\\Filament\\Clusters')
|
||||
->pages([
|
||||
Dashboard::class,
|
||||
// Dashboard::class,
|
||||
])
|
||||
->maxContentWidth(Width::ScreenTwoExtraLarge)
|
||||
->breadcrumbs(false)
|
||||
|
||||
Generated
+2
@@ -1990,6 +1990,7 @@
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -2223,6 +2224,7 @@
|
||||
"integrity": "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.27.0",
|
||||
"fdir": "^6.5.0",
|
||||
|
||||
@@ -5,19 +5,20 @@
|
||||
@source '../../../../resources/views/filament/pages/**/*';
|
||||
@source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php';
|
||||
|
||||
/* hide reset link in filters */
|
||||
.fi-ta-filters-heading,
|
||||
button[wire\:click="resetTableFiltersForm"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fi-ta-header-toolbar {
|
||||
/* .fi-ta-header-toolbar {
|
||||
@apply flex-row-reverse;
|
||||
}
|
||||
|
||||
.fi-ta-header-toolbar>*:nth-child(2) {
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
} */
|
||||
|
||||
.fi-ta-header-cell-oddstotal,
|
||||
.fi-ta-header-cell-oddstq,
|
||||
@@ -26,5 +27,5 @@ button[wire\:click="resetTableFiltersForm"] {
|
||||
.fi-ta-header-cell-odds3way,
|
||||
.fi-ta-header-cell-oddsdc,
|
||||
.fi-ta-header-cell-id {
|
||||
padding: 0 !important;
|
||||
@apply !p-0
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="h-4 mb-0.5 ml-0.5 border border-white">
|
||||
<div class="text-gray-700 dark:text-gray-400 h-4 mb-0.5 ml-0.5 border border-transparent">
|
||||
|
||||
@if (isset($odd))
|
||||
{{ number_format($odd, $decimal) }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="flex gap-4 justify-end">
|
||||
@foreach ($multilines as $multiline)
|
||||
<x-filament::button tooltip="{{ $multiline['name'] }}" wire:click="toggleBettype({{ $multiline['id'] }})"
|
||||
<x-filament::button size="xs" tooltip="{{ $multiline['name'] }}" wire:click="toggleBettype({{ $multiline['id'] }})"
|
||||
wire:dispatch="refreshTable" :color="!$multiline['is_active'] ? 'gray' : 'primary'"> {{ $multiline['short'] }} </x-filament::button>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="flex flex-1 gap-4">
|
||||
@if ($this->current == 'filament.admin.resources.events.index')
|
||||
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="{{ $iconcolor }}">
|
||||
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="primary">
|
||||
<x-filament::input.select wire:model="sport_id" wire:change="swopSport">
|
||||
@foreach ($sports as $id => $name)
|
||||
<option value="{{ $id }}">{{ $name }}</option>
|
||||
|
||||
Reference in new issue
Block a user