Skip to content

Commit afc6323

Browse files
committed
fix invisible actions
1 parent 1c30f16 commit afc6323

File tree

20 files changed

+95
-34
lines changed

20 files changed

+95
-34
lines changed

announcements/src/Filament/Admin/Resources/Announcements/Pages/ManageAnnouncements.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ protected function getHeaderActions(): array
1414
{
1515
return [
1616
CreateAction::make()
17-
->createAnother(false),
17+
->createAnother(false)
18+
->hiddenLabel()
19+
->icon('tabler-plus'),
1820
];
1921
}
2022
}

generic-oidc-providers/src/Filament/Admin/Resources/GenericOIDCProviders/Pages/CreateGenericOIDCProvider.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Boy132\GenericOIDCProviders\Filament\Admin\Resources\GenericOIDCProviders\Pages;
44

55
use Boy132\GenericOIDCProviders\Filament\Admin\Resources\GenericOIDCProviders\GenericOIDCProviderResource;
6+
use Filament\Actions\Action;
67
use Filament\Resources\Pages\CreateRecord;
78
use Illuminate\Support\Str;
89

@@ -12,18 +13,23 @@ class CreateGenericOIDCProvider extends CreateRecord
1213

1314
protected static bool $canCreateAnother = false;
1415

15-
protected function getFormActions(): array
16-
{
17-
return [];
18-
}
19-
2016
protected function getHeaderActions(): array
2117
{
2218
return [
23-
$this->getCreateFormAction()->formId('form'),
19+
Action::make('create')
20+
->hiddenLabel()
21+
->action('create')
22+
->keyBindings(['mod+s'])
23+
->tooltip(trans('filament-panels::resources/pages/create-record.form.actions.create.label'))
24+
->icon('tabler-file-plus'),
2425
];
2526
}
2627

28+
protected function getFormActions(): array
29+
{
30+
return [];
31+
}
32+
2733
protected function mutateFormDataBeforeCreate(array $data): array
2834
{
2935
$data['id'] = Str::slug($data['id'], '_');

generic-oidc-providers/src/Filament/Admin/Resources/GenericOIDCProviders/Pages/EditGenericOIDCProvider.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Boy132\GenericOIDCProviders\Filament\Admin\Resources\GenericOIDCProviders\Pages;
44

55
use Boy132\GenericOIDCProviders\Filament\Admin\Resources\GenericOIDCProviders\GenericOIDCProviderResource;
6+
use Filament\Actions\Action;
67
use Filament\Actions\DeleteAction;
78
use Filament\Resources\Pages\EditRecord;
89

@@ -19,7 +20,12 @@ protected function getHeaderActions(): array
1920
{
2021
return [
2122
DeleteAction::make(),
22-
$this->getSaveFormAction()->formId('form'),
23+
Action::make('save')
24+
->hiddenLabel()
25+
->action('save')
26+
->keyBindings(['mod+s'])
27+
->tooltip(trans('filament-panels::resources/pages/edit-record.form.actions.save.label'))
28+
->icon('tabler-device-floppy'),
2329
];
2430
}
2531
}

generic-oidc-providers/src/Filament/Admin/Resources/GenericOIDCProviders/Pages/ListGenericOIDCProviders.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ class ListGenericOIDCProviders extends ListRecords
1313
protected function getHeaderActions(): array
1414
{
1515
return [
16-
CreateAction::make(),
16+
CreateAction::make()
17+
->createAnother(false)
18+
->hiddenLabel()
19+
->icon('tabler-plus'),
1720
];
1821
}
1922
}

legal-pages/src/Filament/Admin/Pages/LegalPages.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ protected function getHeaderActions(): array
102102
{
103103
return [
104104
Action::make('save')
105-
->label(trans('filament-panels::resources/pages/edit-record.form.actions.save.label'))
106105
->authorize(fn () => user()?->can('update legalPage'))
106+
->hiddenLabel()
107107
->action('save')
108-
->keyBindings(['mod+s']),
108+
->keyBindings(['mod+s'])
109+
->tooltip(trans('filament-panels::resources/pages/edit-record.form.actions.save.label'))
110+
->icon('tabler-device-floppy'),
109111
];
110112
}
111113

mclogs-uploader/src/Filament/Components/Actions/UploadLogsAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function setUp(): void
2828
return $server->retrieveStatus()->isOffline();
2929
});
3030

31-
$this->label(fn () => trans('mclogs-uploader::upload.upload_logs'));
31+
$this->tooltip(fn () => trans('mclogs-uploader::upload.upload_logs'));
3232

3333
$this->icon('tabler-upload');
3434

minecraft-modrinth/src/Filament/Server/Pages/MinecraftModrinthProjectPage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ protected function getHeaderActions(): array
187187

188188
return [
189189
Action::make('open_folder')
190-
->label(fn () => trans('minecraft-modrinth::strings.page.open_folder', ['folder' => $folder]))
190+
->tooltip(fn () => trans('minecraft-modrinth::strings.page.open_folder', ['folder' => $folder]))
191+
->icon('tabler-folder-open')
191192
->url(fn () => ListFiles::getUrl(['path' => $folder]), true),
192193
];
193194
}

player-counter/src/Filament/Admin/Resources/GameQueries/Pages/ManageGameQueries.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ protected function getHeaderActions(): array
1414
{
1515
return [
1616
CreateAction::make()
17-
->createAnother(false),
17+
->createAnother(false)
18+
->hiddenLabel()
19+
->icon('tabler-plus'),
1820
];
1921
}
2022
}

rust-umod/src/Filament/Server/Pages/RustUModPluginsPage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ protected function getHeaderActions(): array
126126
{
127127
return [
128128
Action::make('open_folder')
129-
->label(fn () => 'Open plugins folder')
129+
->tooltip(fn () => 'Open plugins folder')
130+
->icon('tabler-folder-open')
130131
->url(fn () => ListFiles::getUrl(['path' => 'oxide/plugins']), true),
131132
];
132133
}

subdomains/src/Filament/Admin/Resources/CloudflareDomains/Pages/ManageCloudflareDomains.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ protected function getHeaderActions(): array
1818
return [
1919
CreateAction::make()
2020
->createAnother(false)
21+
->hiddenLabel()
22+
->icon('tabler-plus')
2123
->hidden(fn () => is_null(config('subdomains.token')))
2224
->using(function (array $data) {
2325
try {

0 commit comments

Comments
 (0)