feat/docker-compose-update (#18)

Co-authored-by: jon brookes <marshyon@gmail.com>
Reviewed-on: https://codeberg.org/headshed/share-lt/pulls/18
This commit is contained in:
Jon Brookes 2026-02-08 18:04:18 +01:00
parent fd43495e2d
commit 1a22fd156d
70 changed files with 1068 additions and 745 deletions

View file

@ -2,6 +2,7 @@
namespace App\Filament\Resources\Media\Tables;
use Filament\Actions\Action;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
@ -19,11 +20,12 @@ class MediaTable
public static function configure(Table $table): Table
{
return $table
->modifyQueryUsing(fn ($query) => $query->where('collection_name', '!=', 'avatars'))
->modifyQueryUsing(fn($query) => $query->where('collection_name', '!=', 'avatars'))
->columns([
ImageColumn::make('url')
->label('Preview')
->getStateUsing(fn ($record) =>
->getStateUsing(
fn($record) =>
// Prefer the stored path produced by Filament's FileUpload (saved in custom_properties),
// fall back to Spatie's getUrl() when no stored_path exists.
($record->getCustomProperty('stored_path'))
@ -40,7 +42,7 @@ class MediaTable
->badge(),
TextColumn::make('mime_type'),
TextColumn::make('size')
->formatStateUsing(fn ($state) => number_format($state / 1024, 2).' KB'),
->formatStateUsing(fn($state) => number_format($state / 1024, 2) . ' KB'),
TextColumn::make('created_at')
->dateTime(),
])
@ -52,7 +54,7 @@ class MediaTable
]),
])
->recordActions([
EditAction::make(),
// EditAction::make(),
DeleteAction::make()
->action(function (Media $record) {
// Delete the actual stored file path if we saved one, otherwise fall back to the Spatie path.
@ -67,6 +69,13 @@ class MediaTable
}),
])
->toolbarActions([
Action::make('add')
->label('Add')
->icon('heroicon-o-plus')
->url(fn() => url('admin/assets/create'))
->color('primary'),
BulkActionGroup::make([
DeleteBulkAction::make()
->action(function (Collection $records) {