Skip to content

Commit

Permalink
Fix tests & logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lguichard committed Feb 16, 2024
1 parent 35dbde3 commit 9b40fa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions packages/admin/src/LunarPanelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Support\Facades\Request;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession;
Expand Down Expand Up @@ -141,6 +142,10 @@ public function register(): self
'chartSecondary' => Color::Green,
]);

if (Request::is(Filament::getPanel()->getPath().'*')) {
config()->set('livewire.inject_assets', true);
}

return $this;
}

Expand Down
4 changes: 0 additions & 4 deletions packages/admin/src/LunarPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ protected function registerPanelAssets(): void
FilamentAsset::register([
Css::make('lunar-panel', __DIR__.'/../resources/dist/lunar-panel.css'),
], 'lunarphp/panel');

if ($this->app['request']->is($this->app['lunar-panel']->getPanel()->getPath().'*')) {
$this->app['config']->set('livewire.inject_assets', true);
}
}

/**
Expand Down

0 comments on commit 9b40fa2

Please sign in to comment.