mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-09 17:08:57 +02:00
Update import egg action
This commit is contained in:
parent
52d855fb99
commit
29ed586c88
@ -17,7 +17,6 @@ use Filament\Schemas\Components\Tabs;
|
|||||||
use Filament\Schemas\Components\Tabs\Tab;
|
use Filament\Schemas\Components\Tabs\Tab;
|
||||||
use Filament\Schemas\Components\Utilities\Get;
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
use Filament\Schemas\Components\Utilities\Set;
|
use Filament\Schemas\Components\Utilities\Set;
|
||||||
use Filament\Support\Enums\IconSize;
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
@ -100,9 +99,6 @@ class ImportEggAction extends Action
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function multiple(bool|Closure $condition = true): static
|
public function multiple(bool|Closure $condition = true): static
|
||||||
{
|
{
|
||||||
$isMultiple = (bool) $this->evaluate($condition);
|
$isMultiple = (bool) $this->evaluate($condition);
|
||||||
@ -132,16 +128,11 @@ class ImportEggAction extends Action
|
|||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
->live()
|
->live()
|
||||||
->hintAction(
|
->hintIcon('tabler-refresh')
|
||||||
Action::make('refresh')
|
->hintIconTooltip(trans('admin/egg.import.refresh'))
|
||||||
->hiddenLabel()
|
->hintAction(function () {
|
||||||
->icon('tabler-refresh')
|
Artisan::call(UpdateEggIndexCommand::class);
|
||||||
->iconSize(IconSize::Medium)
|
})
|
||||||
->tooltip(trans('admin/egg.import.refresh'))
|
|
||||||
->action(function () {
|
|
||||||
Artisan::call(UpdateEggIndexCommand::class);
|
|
||||||
})
|
|
||||||
)
|
|
||||||
->afterStateUpdated(function ($state, Set $set, Get $get) use ($isMultiple) {
|
->afterStateUpdated(function ($state, Set $set, Get $get) use ($isMultiple) {
|
||||||
if ($state) {
|
if ($state) {
|
||||||
$urls = $isMultiple ? $get('urls') : [];
|
$urls = $isMultiple ? $get('urls') : [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user