mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-27 22:47:23 +08:00
admin add more field searchable
This commit is contained in:
@@ -53,7 +53,7 @@ class TagResource extends Resource
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('id'),
|
||||
Tables\Columns\TextColumn::make('name')->label(__('label.name')),
|
||||
Tables\Columns\TextColumn::make('name')->label(__('label.name'))->searchable(),
|
||||
Tables\Columns\TextColumn::make('color')->label(__('label.tag.color')),
|
||||
Tables\Columns\TextColumn::make('font_color')->label(__('label.tag.font_color')),
|
||||
Tables\Columns\TextColumn::make('font_size')->label(__('label.tag.font_size')),
|
||||
|
||||
@@ -69,7 +69,7 @@ class TorrentResource extends Resource
|
||||
$tags = sprintf(' <div>%s</div>', $record->tagsFormatted);
|
||||
|
||||
return new HtmlString('<div class="flex">' . $name . $tags . '</div>');
|
||||
})->label(__('label.name')),
|
||||
})->label(__('label.name'))->searchable(),
|
||||
Tables\Columns\TextColumn::make('posStateText')->label(__('label.torrent.pos_state')),
|
||||
Tables\Columns\TextColumn::make('spStateText')->label(__('label.torrent.sp_state')),
|
||||
Tables\Columns\TextColumn::make('size')->label(__('label.torrent.size'))->formatStateUsing(fn ($state) => mksize($state)),
|
||||
@@ -139,6 +139,7 @@ class TorrentResource extends Resource
|
||||
Forms\Components\Select::make('pos_state')
|
||||
->label(__('label.torrent.pos_state'))
|
||||
->options(Torrent::listPosStates(true))
|
||||
->required()
|
||||
])
|
||||
->icon('heroicon-o-arrow-circle-up')
|
||||
->action(function (Collection $records, array $data) {
|
||||
@@ -163,7 +164,8 @@ class TorrentResource extends Resource
|
||||
Forms\Components\CheckboxList::make('tags')
|
||||
->label(__('label.tag.label'))
|
||||
->columns(4)
|
||||
->options(TagRepository::createBasicQuery()->pluck('name', 'id')->toArray()),
|
||||
->options(TagRepository::createBasicQuery()->pluck('name', 'id')->toArray())
|
||||
->required(),
|
||||
])
|
||||
->icon('heroicon-o-tag')
|
||||
->action(function (Collection $records, array $data) {
|
||||
|
||||
Reference in New Issue
Block a user