mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-10 07:48:36 +02:00
fix hint action for egg import github refresh
This commit is contained in:
parent
a26b7f1c04
commit
74b3f423ed
@ -17,6 +17,7 @@ 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;
|
||||||
@ -113,11 +114,16 @@ class ImportEggAction extends Action
|
|||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
->live()
|
->live()
|
||||||
->hintIcon('tabler-refresh')
|
->hintAction(
|
||||||
->hintIconTooltip(trans('admin/egg.import.refresh'))
|
Action::make('refresh')
|
||||||
->hintAction(function () {
|
->hiddenLabel()
|
||||||
Artisan::call(UpdateEggIndexCommand::class);
|
->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) {
|
->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