fix hint action for egg import github refresh

This commit is contained in:
Boy132 2025-07-23 09:09:15 +02:00
parent a26b7f1c04
commit 74b3f423ed

View File

@ -17,6 +17,7 @@ use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Components\Utilities\Get;
use Filament\Schemas\Components\Utilities\Set;
use Filament\Support\Enums\IconSize;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Str;
@ -113,11 +114,16 @@ class ImportEggAction extends Action
->searchable()
->preload()
->live()
->hintIcon('tabler-refresh')
->hintIconTooltip(trans('admin/egg.import.refresh'))
->hintAction(function () {
Artisan::call(UpdateEggIndexCommand::class);
})
->hintAction(
Action::make('refresh')
->hiddenLabel()
->icon('tabler-refresh')
->iconSize(IconSize::Medium)
->tooltip(trans('admin/egg.import.refresh'))
->action(function () {
Artisan::call(UpdateEggIndexCommand::class);
})
)
->afterStateUpdated(function ($state, Set $set, Get $get) use ($isMultiple) {
if ($state) {
$urls = $isMultiple ? $get('urls') : [];