wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Filament\Resources\Events\Pages\ListEvents;
|
||||
use Carbon\Carbon;
|
||||
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\FilamentTimezone;
|
||||
use Filament\Support\Facades\FilamentView;
|
||||
use Filament\Tables\View\TablesRenderHook;
|
||||
use Filament\View\PanelsRenderHook;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
|
||||
FilamentTimezone::set('Europe/Vienna');
|
||||
|
||||
/** Alpine Plugin direct */
|
||||
FilamentView::registerRenderHook(
|
||||
'panels::head.end',
|
||||
fn(): HtmlString => new HtmlString('
|
||||
<script>
|
||||
document.addEventListener("alpine:init", () => {
|
||||
(function(){function l(t){t.directive("sort",(e,{modifiers:d,expression:c},{evaluateLater:p,cleanup:f})=>{let m=p(c),v=d.includes("group")?e.getAttribute("x-sort:group"):"default";e._sortable=new Sortable(e,{group:v,animation:150,onEnd:s=>{let n=s.item.getAttribute("x-sort:item"),a=s.oldIndex,i=s.newIndex,r=s.to.getAttribute("id")||"default";m(()=>{},{scope:{$item:n,$oldIndex:a,$newIndex:i,$owner:r}})}});f(()=>e._sortable.destroy())})}l.inline=l;var u=l;document.addEventListener("DOMContentLoaded",()=>{if(typeof Sortable==="undefined"){let t=document.createElement("script");t.src="https://cloudflare.com";document.head.appendChild(t)}});})();
|
||||
});
|
||||
</script>
|
||||
'),
|
||||
);
|
||||
|
||||
FilamentAsset::register([
|
||||
Css::make('font-stylesheet', __DIR__ . '/../../resources/css/font.css'),
|
||||
Js::make('number-animator', __DIR__ . '/../../resources/js/number-animator.js'),
|
||||
]);
|
||||
|
||||
FilamentView::registerRenderHook(
|
||||
PanelsRenderHook::USER_MENU_PROFILE_AFTER,
|
||||
fn(): string => Blade::render('@livewire(\'konto-switcher\')'),
|
||||
);
|
||||
FilamentView::registerRenderHook(
|
||||
TablesRenderHook::TOOLBAR_SEARCH_BEFORE,
|
||||
fn(): string => Blade::render('@livewire(\'sport-switcher\')'),
|
||||
scopes: [
|
||||
ListEvents::class,
|
||||
]
|
||||
);
|
||||
// PanelsRenderHook::RESOURCE_PAGES_LIST_RECORDS_TABLE_BEFORE,
|
||||
FilamentView::registerRenderHook(
|
||||
TablesRenderHook::TOOLBAR_SEARCH_AFTER,
|
||||
fn(): string => Blade::render('@livewire(\'bettype-toggle\')'),
|
||||
scopes: [
|
||||
ListEvents::class,
|
||||
]
|
||||
);
|
||||
FilamentView::registerRenderHook(
|
||||
PanelsRenderHook::GLOBAL_SEARCH_BEFORE,
|
||||
fn(): string => Blade::render('@livewire(\'top-menu-items\')')
|
||||
);
|
||||
|
||||
// FilamentView::registerRenderHook(
|
||||
// PanelsRenderHook::GLOBAL_SEARCH_AFTER,
|
||||
// fn (): View => view('filament.modals.position-abbreviation'),
|
||||
// );
|
||||
|
||||
Carbon::setLocale(app()->getLocale());
|
||||
|
||||
FilamentColor::register([
|
||||
'primary' => Color::Blue,
|
||||
'danger' => Color::Red,
|
||||
'gray' => Color::Zinc,
|
||||
'info' => Color::Blue,
|
||||
'success' => Color::Green,
|
||||
'warning' => Color::Amber,
|
||||
'sky' => Color::Sky,
|
||||
'yellow' => Color::Yellow,
|
||||
'teal' => Color::Teal,
|
||||
'purple' => Color::Purple,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user