mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
admin add more field searchable
This commit is contained in:
@@ -61,7 +61,7 @@ class MedalResource extends Resource
|
|||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
Tables\Columns\TextColumn::make('id')->sortable(),
|
Tables\Columns\TextColumn::make('id')->sortable(),
|
||||||
Tables\Columns\TextColumn::make('name')->label(__('label.name')),
|
Tables\Columns\TextColumn::make('name')->label(__('label.name'))->searchable(),
|
||||||
Tables\Columns\ImageColumn::make('image_large')->height(120)->label(__('label.medal.image_large')),
|
Tables\Columns\ImageColumn::make('image_large')->height(120)->label(__('label.medal.image_large')),
|
||||||
Tables\Columns\ImageColumn::make('image_small')->height(120)->label(__('label.medal.image_small')),
|
Tables\Columns\ImageColumn::make('image_small')->height(120)->label(__('label.medal.image_small')),
|
||||||
Tables\Columns\TextColumn::make('getTypeText')->label('Get type')->label(__('label.medal.get_type')),
|
Tables\Columns\TextColumn::make('getTypeText')->label('Get type')->label(__('label.medal.get_type')),
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class TagResource extends Resource
|
|||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
Tables\Columns\TextColumn::make('id'),
|
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('color')->label(__('label.tag.color')),
|
||||||
Tables\Columns\TextColumn::make('font_color')->label(__('label.tag.font_color')),
|
Tables\Columns\TextColumn::make('font_color')->label(__('label.tag.font_color')),
|
||||||
Tables\Columns\TextColumn::make('font_size')->label(__('label.tag.font_size')),
|
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);
|
$tags = sprintf(' <div>%s</div>', $record->tagsFormatted);
|
||||||
|
|
||||||
return new HtmlString('<div class="flex">' . $name . $tags . '</div>');
|
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('posStateText')->label(__('label.torrent.pos_state')),
|
||||||
Tables\Columns\TextColumn::make('spStateText')->label(__('label.torrent.sp_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)),
|
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')
|
Forms\Components\Select::make('pos_state')
|
||||||
->label(__('label.torrent.pos_state'))
|
->label(__('label.torrent.pos_state'))
|
||||||
->options(Torrent::listPosStates(true))
|
->options(Torrent::listPosStates(true))
|
||||||
|
->required()
|
||||||
])
|
])
|
||||||
->icon('heroicon-o-arrow-circle-up')
|
->icon('heroicon-o-arrow-circle-up')
|
||||||
->action(function (Collection $records, array $data) {
|
->action(function (Collection $records, array $data) {
|
||||||
@@ -163,7 +164,8 @@ class TorrentResource extends Resource
|
|||||||
Forms\Components\CheckboxList::make('tags')
|
Forms\Components\CheckboxList::make('tags')
|
||||||
->label(__('label.tag.label'))
|
->label(__('label.tag.label'))
|
||||||
->columns(4)
|
->columns(4)
|
||||||
->options(TagRepository::createBasicQuery()->pluck('name', 'id')->toArray()),
|
->options(TagRepository::createBasicQuery()->pluck('name', 'id')->toArray())
|
||||||
|
->required(),
|
||||||
])
|
])
|
||||||
->icon('heroicon-o-tag')
|
->icon('heroicon-o-tag')
|
||||||
->action(function (Collection $records, array $data) {
|
->action(function (Collection $records, array $data) {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class HitAndRunResource extends Resource
|
|||||||
->columns([
|
->columns([
|
||||||
Tables\Columns\TextColumn::make('id')->sortable(),
|
Tables\Columns\TextColumn::make('id')->sortable(),
|
||||||
Tables\Columns\TextColumn::make('user.username')->searchable()->label(__('label.username')),
|
Tables\Columns\TextColumn::make('user.username')->searchable()->label(__('label.username')),
|
||||||
Tables\Columns\TextColumn::make('torrent.name')->limit(40)->label(__('label.torrent.label')),
|
Tables\Columns\TextColumn::make('torrent.name')->limit(30)->label(__('label.torrent.label')),
|
||||||
Tables\Columns\TextColumn::make('snatch.uploadText')->label(__('label.uploaded')),
|
Tables\Columns\TextColumn::make('snatch.uploadText')->label(__('label.uploaded')),
|
||||||
Tables\Columns\TextColumn::make('snatch.downloadText')->label(__('label.downloaded')),
|
Tables\Columns\TextColumn::make('snatch.downloadText')->label(__('label.downloaded')),
|
||||||
Tables\Columns\TextColumn::make('snatch.shareRatio')->label(__('label.ratio')),
|
Tables\Columns\TextColumn::make('snatch.shareRatio')->label(__('label.ratio')),
|
||||||
|
|||||||
Reference in New Issue
Block a user