Skip to content

Commit 60803b5

Browse files
AzGasimgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 6ea0191 commit 60803b5

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

packages/media/src/Resources/MediaResource.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,35 +55,35 @@ public static function form(Form $form): Form
5555
->schema([
5656
Placeholder::make('mime_type')
5757
->label('Dateityp')
58-
->content(fn($record) => $record->mime_type),
58+
->content(fn ($record) => $record->mime_type),
5959

6060
Placeholder::make('size')
6161
->label('Dateigröße')
62-
->content(fn($record) => number_format($record->size / 1024, 2) . ' KB'),
62+
->content(fn ($record) => number_format($record->size / 1024, 2).' KB'),
6363

6464
Placeholder::make('file_name')
6565
->label('Originaldateiname')
66-
->content(fn($record) => $record->file_name),
66+
->content(fn ($record) => $record->file_name),
6767

6868
Placeholder::make('dimensions')
6969
->label('Abmessungen')
7070
->content(function ($record) {
7171
$dimensions = $record->getCustomProperty('dimensions');
72-
if (!$dimensions) {
72+
if (! $dimensions) {
7373
return '-';
7474
}
7575

7676
return "{$dimensions['width']} × {$dimensions['height']} Pixel";
7777
})
78-
->visible(fn($record) => str_starts_with($record->mime_type, 'image/')),
78+
->visible(fn ($record) => str_starts_with($record->mime_type, 'image/')),
7979

8080
Placeholder::make('created_at')
8181
->label('Hochgeladen am')
82-
->content(fn($record) => $record->created_at?->format('d.m.Y H:i')),
82+
->content(fn ($record) => $record->created_at?->format('d.m.Y H:i')),
8383

8484
Placeholder::make('updated_at')
8585
->label('Zuletzt bearbeitet')
86-
->content(fn($record) => $record->updated_at?->format('d.m.Y H:i')),
86+
->content(fn ($record) => $record->updated_at?->format('d.m.Y H:i')),
8787

8888
Placeholder::make('usage')
8989
->label('Verwendet in')
@@ -98,7 +98,7 @@ public static function form(Form $form): Form
9898

9999
$links = $usages->map(function ($usage) {
100100
$type = Str::plural(strtolower(class_basename($usage->media_usable_type)));
101-
$url = Filament::getCurrentPanel()->getUrl() . '/' . $type . '/' . $usage->media_usable_id;
101+
$url = Filament::getCurrentPanel()->getUrl().'/'.$type.'/'.$usage->media_usable_id;
102102

103103
return Blade::render('<a href="{{ $url }}" target="_blank" class="text-primary underline">{{ $url }}</a>', [
104104
'url' => $url,
@@ -153,7 +153,7 @@ public static function table(Table $table): Table
153153
'class' => 'rounded-lg',
154154
'style' => 'width: 100%; height: auto; min-width: 150px; max-width: 250px; aspect-ratio: 1/1; object-fit: cover;',
155155
])
156-
->tooltip(fn($record) => $record->title ?? 'Kein Titel')
156+
->tooltip(fn ($record) => $record->title ?? 'Kein Titel')
157157
->searchable(['name', 'title', 'description', 'alt', 'internal_note']),
158158
]),
159159
])
@@ -170,7 +170,7 @@ public static function table(Table $table): Table
170170
->color('danger')
171171
->icon('heroicon-m-trash')
172172
->requiresConfirmation()
173-
->modalHeading(fn($record) => 'Bild "' . ($record->title ?: $record->name) . '" löschen')
173+
->modalHeading(fn ($record) => 'Bild "'.($record->title ?: $record->name).'" löschen')
174174
->modalDescription('Sind Sie sicher, dass Sie dieses Bild löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.')
175175
->modalSubmitActionLabel('Ja, löschen')
176176
->modalCancelActionLabel('Abbrechen')
@@ -191,7 +191,7 @@ public static function table(Table $table): Table
191191
'documents' => 'Dokumente',
192192
])
193193
->query(function (Builder $query, array $data) {
194-
if (!$data['value']) {
194+
if (! $data['value']) {
195195
return $query;
196196
}
197197

@@ -236,7 +236,7 @@ public static function table(Table $table): Table
236236
'year' => 'Dieses Jahr',
237237
])
238238
->query(function (Builder $query, array $data) {
239-
if (!$data['value']) {
239+
if (! $data['value']) {
240240
return $query;
241241
}
242242

packages/media/src/Tables/Columns/CustomImageColumn.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function getState(): mixed
1212
{
1313
$record = $this->getRecord();
1414

15-
if (!$record) {
15+
if (! $record) {
1616
return null;
1717
}
1818

@@ -41,7 +41,7 @@ public function getImageUrl(?string $state = null): ?string
4141
{
4242
$record = $this->getRecord();
4343

44-
if (!$record) {
44+
if (! $record) {
4545
return null;
4646
}
4747

@@ -59,14 +59,12 @@ public function getImageUrl(?string $state = null): ?string
5959

6060
->value('media.id');
6161

62-
if (!$mediaId) {
62+
if (! $mediaId) {
6363
return null;
6464
}
6565

6666
$media = Media::find($mediaId);
6767

6868
return $media ? $media->getUrl() : null;
6969
}
70-
71-
7270
}

0 commit comments

Comments
 (0)