Skip to content

Commit

Permalink
fix: various bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Dec 14, 2024
1 parent e084c22 commit 4e93b93
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Livewire/MoleculeDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function rendered()
$molecule = $this->molecule;
$id = $molecule->identifier;
$_molecule = Cache::get('molecules.'.$id);
if (! $_molecule->relationLoaded('properties')) {
if ($_molecule && ! $_molecule->relationLoaded('properties')) {
Cache::forget('molecules.'.$id);
Cache::remember('molecules.'.$id, 172800, function () use ($molecule) {
$molecule['schema'] = $molecule->getSchema();
Expand Down
3 changes: 3 additions & 0 deletions app/Providers/Filament/DashboardPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Kenepa\Banner\BannerPlugin;
use pxlrbt\FilamentSpotlight\SpotlightPlugin;

class DashboardPanelProvider extends PanelProvider
Expand All @@ -46,6 +47,8 @@ public function panel(Panel $panel): Panel
->favoritesBarDefaultView(false)
->presetViewsManageable(false),
SpotlightPlugin::make(),
BannerPlugin::make()
->disableBannerManager(),
])
->discoverWidgets(in: app_path('Filament/Dashboard/Widgets'), for: 'App\\Filament\\Dashboard\\Widgets')
->widgets([
Expand Down
4 changes: 2 additions & 2 deletions resources/views/livewire/banner-component.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
}"
style="z-index:1; background-color: {{ $startColor }}; background-image: linear-gradient(to right, {{ $startColor }}, {{ $endColor }}); color: {{ $banner->text_color ?? '#FFFFFF' }};"
id="banner-{{ $banner->id }}" @class([
'grid grid-cols-12 pl-6 py-2 pr-8',
'pl-6 py-2 pr-8',
'rounded-lg' =>
$banner->render_location !==
\Filament\View\PanelsRenderHook::BODY_START,
])>
<div class="col-span-12 flex items-center text-sm w-full">
<div class="flex items-center text-sm w-full">
@if ($banner->icon)
<x-filament::icon alias="banner::icon" :icon="$banner->icon"
style="color: {{ $banner->icon_color ?? '#FFFFFF' }}" class="h-6 w-6 mr-2 text-white" />
Expand Down
4 changes: 2 additions & 2 deletions resources/views/vendor/banner/components/banner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
style="background-color: {{ $banner->start_color }}; background-image: linear-gradient(to right, {{ $start_color }}, {{ $end_color }}) ;color: {{ $banner->text_color ?? '#FFFFFF' }};"
id="{{ $banner->id }}"
@class([
'grid grid-cols-12 pl-6 py-2 pr-8',
'pl-6 py-2 pr-8',
'rounded-lg' => $banner->render_location !== \Filament\View\PanelsRenderHook::BODY_START
])>
<div class="col-span-12 flex items-center text-sm text-center w-full px-4">
<div class="flex items-center text-sm text-center w-full px-4">
<div>
@if ($banner->icon)
<x-filament::icon
Expand Down

0 comments on commit 4e93b93

Please sign in to comment.