Skip to content

Commit

Permalink
Merge pull request #559 from iRaziul/3.x
Browse files Browse the repository at this point in the history
Fix deprecated nested ternary expressions and file extension preview
  • Loading branch information
awcodes authored Dec 3, 2024
2 parents 230ce61 + 08821bb commit ffa3342
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion resources/views/components/forms/edit-preview.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class="overflow-hidden h-full w-auto border border-gray-300 rounded dark:border-
icon-size="xl"
class="p-4 rounded"
:type="$file['type']"
:extension="$file['ext']"
/>
@endif

Expand All @@ -35,4 +36,4 @@ class="p-4 rounded"
</div>
</div>
</x-dynamic-component>
@endif
@endif
1 change: 1 addition & 0 deletions resources/views/components/forms/preview.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class="overflow-hidden border border-gray-300 rounded dark:border-gray-900 check
icon-size="xl"
class="p-4 rounded"
:type="$record->type"
:extension="$record->ext"
/>
@endif
</div>
4 changes: 2 additions & 2 deletions src/Resources/MediaResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public static function getCluster(): ?string
public static function getNavigationBadge(): ?string
{
return CuratorPlugin::get()->getNavigationCountBadge() ?
(Filament::hasTenancy() && Config::get('curator.is_tenant_aware')) ?
(Filament::hasTenancy() && Config::get('curator.is_tenant_aware') ?
static::getEloquentQuery()
->where(Config::get('curator.tenant_ownership_relationship_name') . '_id', Filament::getTenant()->id)
->count()
: number_format(static::getModel()::count())
: number_format(static::getModel()::count()))
: null;
}

Expand Down

0 comments on commit ffa3342

Please sign in to comment.