mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fix bannedemails no effect
This commit is contained in:
@@ -72,7 +72,8 @@ class TagResource extends Resource
|
||||
Tables\Columns\TextColumn::make('border_radius')->label(__('label.tag.border_radius')),
|
||||
Tables\Columns\TextColumn::make('priority')->label(__('label.priority'))->sortable(),
|
||||
Tables\Columns\TextColumn::make('torrents_count')->label(__('label.tag.torrents_count')),
|
||||
Tables\Columns\TextColumn::make('updated_at')->dateTime()->label(__('label.updated_at')),
|
||||
Tables\Columns\TextColumn::make('torrents_sum_size')->label(__('label.tag.torrents_sum_size'))->formatStateUsing(fn ($state) => mksize($state)),
|
||||
// Tables\Columns\TextColumn::make('updated_at')->dateTime()->label(__('label.updated_at')),
|
||||
])
|
||||
->defaultSort('priority', 'desc')
|
||||
->filters([
|
||||
|
||||
@@ -23,7 +23,7 @@ class ListTags extends PageList
|
||||
|
||||
protected function getTableQuery(): Builder
|
||||
{
|
||||
return Tag::query()->withCount('torrents');
|
||||
return Tag::query()->withCount('torrents')->withSum('torrents', 'size');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -151,6 +151,11 @@ class TorrentResource extends Resource
|
||||
Tables\Filters\SelectFilter::make('hr')
|
||||
->options(self::getYesNoOptions())
|
||||
->label(__('label.torrent.hr')),
|
||||
|
||||
Tables\Filters\SelectFilter::make('tags')
|
||||
->relationship('tags', 'name')
|
||||
->label(__('label.tag.label'))
|
||||
,
|
||||
])
|
||||
->actions(self::getActions())
|
||||
->bulkActions(self::getBulkActions());
|
||||
|
||||
Reference in New Issue
Block a user