mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-09 12:29:29 +01:00
make "all" tab first
This commit is contained in:
parent
1480f0e602
commit
05abad7254
@ -20,7 +20,11 @@ class ListPlugins extends ListRecords
|
|||||||
|
|
||||||
public function getTabs(): array
|
public function getTabs(): array
|
||||||
{
|
{
|
||||||
$tabs = [];
|
$tabs = [
|
||||||
|
'all' => Tab::make('all')
|
||||||
|
->label(trans('admin/plugin.all'))
|
||||||
|
->badge(Plugin::count()),
|
||||||
|
];
|
||||||
|
|
||||||
foreach (PluginCategory::cases() as $category) {
|
foreach (PluginCategory::cases() as $category) {
|
||||||
$tabs[$category->value] = Tab::make($category->value)
|
$tabs[$category->value] = Tab::make($category->value)
|
||||||
@ -30,10 +34,6 @@ class ListPlugins extends ListRecords
|
|||||||
->modifyQueryUsing(fn ($query) => $query->whereCategory($category->value));
|
->modifyQueryUsing(fn ($query) => $query->whereCategory($category->value));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabs['all'] = Tab::make('all')
|
|
||||||
->label(trans('admin/plugin.all'))
|
|
||||||
->badge(Plugin::count());
|
|
||||||
|
|
||||||
return $tabs;
|
return $tabs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user