Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/Filament/Admin/Resources/ApiKeys/ApiKeyResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ public static function defaultTable(Table $table): Table
DeleteAction::make(),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
])
->emptyStateIcon(TablerIcon::Key)
->emptyStateDescription('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ public static function defaultTable(Table $table): Table
EditAction::make(),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Admin/Resources/Eggs/Pages/ListEggs.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ public function table(Table $table): Table
->toolbarActions([
ImportEggAction::make()
->multiple(),
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
BulkActionGroup::make([
DeleteBulkAction::make()
->before(function (Collection &$records) {
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Admin/Resources/Mounts/MountResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ public static function defaultTable(Table $table): Table
EditAction::make(),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
Expand Down
5 changes: 3 additions & 2 deletions app/Filament/Admin/Resources/Nodes/Pages/CreateNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ public function form(Schema $schema): Schema
->components([
Wizard::make($this->getSteps())
->columnSpanFull()
->nextAction(fn (Action $action) => $action->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowRight))
->previousAction(fn (Action $action) => $action->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowLeft))
->nextAction(fn (Action $action) => $action->tooltip(fn () => $action->getLabel())->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowRight))
->previousAction(fn (Action $action) => $action->tooltip(fn () => $action->getLabel())->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowLeft))
->submitAction(new HtmlString(Blade::render(<<<'BLADE'
<x-filament::icon-button
type="submit"
iconSize="xl"
icon="tabler-plus"
tooltip="{{ trans('admin/node.create') }}"
>
{{ trans('admin/node.create') }}
</x-filament::icon-button>
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ public function table(Table $table): Table
EditAction::make(),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
])
->emptyStateIcon(TablerIcon::Server2)
->emptyStateDescription('')
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Admin/Resources/Roles/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public static function defaultTable(Table $table): Table
EditAction::make(),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
Expand Down
15 changes: 9 additions & 6 deletions app/Filament/Admin/Resources/Servers/Pages/CreateServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ public function form(Schema $schema): Schema
->components([
Wizard::make($this->getSteps())
->columnSpanFull()
->nextAction(fn (Action $action) => $action->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowRight))
->previousAction(fn (Action $action) => $action->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowLeft))
->nextAction(fn (Action $action) => $action->tooltip(fn () => $action->getLabel())->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowRight))
->previousAction(fn (Action $action) => $action->tooltip(fn () => $action->getLabel())->iconButton()->iconSize(IconSize::ExtraLarge)->icon(TablerIcon::ArrowLeft))
->submitAction(new HtmlString(Blade::render(<<<'BLADE'
<x-filament::button
<x-filament::icon-button
type="submit"
size="sm"
iconSize="xl"
icon="tabler-plus"
tooltip="{{ trans('admin/server.create') }}"
>
{{ trans('admin/server.create') }}
</x-filament::button>
</x-filament::icon-button>
BLADE))),
]);
}
Expand All @@ -105,7 +107,8 @@ protected function getDefaultSteps(): array
TextInput::make('name')
->prefixIcon(TablerIcon::Server)
->label(trans('admin/server.name'))
->suffixAction(Action::make('random')
->suffixAction(Action::make('hint_random')
->tooltip('Random')
->icon('tabler-dice-' . random_int(1, 6))
->action(function (Set $set, Get $get) {
$egg = Egg::find($get('egg_id'));
Expand Down
9 changes: 5 additions & 4 deletions app/Filament/Admin/Resources/Servers/Pages/EditServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ protected function getDefaultTabs(): array
->prefixIcon(TablerIcon::Server)
->label(trans('admin/server.name'))
->suffixAction(Action::make('hint_random')
->tooltip('Random')
->icon('tabler-dice-' . random_int(1, 6))
->action(function (Set $set, Get $get) {
$egg = Egg::find($get('egg_id'));
Expand Down Expand Up @@ -862,7 +863,7 @@ protected function getDefaultTabs(): array
->columnSpan(3)
->schema([
Actions::make([
Action::make('toggleInstall')
Action::make('exclude_toggle_install')
->label(trans('admin/server.toggle_install'))
->disabled(fn (Server $server) => $server->isSuspended())
->modal(fn (Server $server) => $server->isFailedInstall())
Expand Down Expand Up @@ -913,7 +914,7 @@ protected function getDefaultTabs(): array
->columnSpan(3)
->schema([
Actions::make([
Action::make('toggleSuspend')
Action::make('exclude_toggle_suspend')
->label(trans('admin/server.suspend'))
->color('warning')
->hidden(fn (Server $server) => $server->isSuspended())
Expand Down Expand Up @@ -969,7 +970,7 @@ protected function getDefaultTabs(): array
->columnSpan(3)
->schema([
Actions::make([
Action::make('transfer')
Action::make('exclude_transfer')
->label(trans('admin/server.transfer'))
->disabled(fn (Server $server) => user()?->accessibleNodes()->count() <= 1 || $server->isInConflictState())
->modalHeading(trans('admin/server.transfer'))
Expand Down Expand Up @@ -1007,7 +1008,7 @@ protected function getDefaultTabs(): array
->columnSpan(3)
->schema([
Actions::make([
Action::make('reinstall')
Action::make('exclude_reinstall')
->label(trans('admin/server.reinstall'))
->color('danger')
->requiresConfirmation()
Expand Down
4 changes: 1 addition & 3 deletions app/Filament/Admin/Resources/Servers/Pages/ListServers.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ public function table(Table $table): Table
EditAction::make(),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
])
->searchable()
->emptyStateIcon(TablerIcon::BrandDocker)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ protected function getDefaultHeaderActions(): array
return [
DeleteAction::make(),
Action::make('test_now')
->label(trans('admin/webhook.test_now'))
->tooltip(trans('admin/webhook.test_now'))
->color('primary')
->disabled(fn (WebhookConfiguration $webhookConfiguration) => count($webhookConfiguration->events) === 0)
->action(fn (WebhookConfiguration $webhookConfiguration) => $webhookConfiguration->run())
->tooltip(trans('admin/webhook.test_now_help')),
->icon(TablerIcon::TestPipe),
Action::make('save')
->hiddenLabel()
->action('save')
Expand Down
8 changes: 3 additions & 5 deletions app/Filament/Admin/Resources/Webhooks/WebhookResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ public static function defaultTable(Table $table): Table
->successRedirectUrl(fn (WebhookConfiguration $replica) => EditWebhookConfiguration::getUrl(['record' => $replica])),
])
->toolbarActions([
CreateAction::make()
->hiddenLabel()
->icon(TablerIcon::Plus),
CreateAction::make(),
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
Expand Down Expand Up @@ -152,9 +150,9 @@ public static function defaultForm(Schema $schema): Schema
->schema(fn () => self::getRegularFields())
->headerActions([
Action::make('reset_headers')
->label(trans('admin/webhook.reset_headers'))
->tooltip(trans('admin/webhook.reset_headers'))
->color('danger')
->icon('heroicon-o-trash')
->icon(TablerIcon::Restore)
->action(fn (Get $get, Set $set) => $set('headers', [
'X-Webhook-Event' => '{{event}}',
])),
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Server/Pages/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public function form(Schema $schema): Schema
->hidden(fn (Server $server) => !user()?->can(SubuserPermission::SettingsReinstall, $server))
->columnSpanFull()
->footerActions([
Action::make('reinstall')
Action::make('exclude_reinstall')
->label(trans('server/setting.reinstall.action'))
->color('danger')
->disabled(fn (Server $server) => !user()?->can(SubuserPermission::SettingsReinstall, $server))
Expand Down
25 changes: 16 additions & 9 deletions app/Providers/Filament/FilamentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,33 +98,33 @@ public function boot(): void
Select::configureUsing(fn (Select $select) => $select->native(false));

KeyValue::configureUsing(fn (KeyValue $keyValue) => $keyValue->deleteAction(function (Action $action) {
$action->tooltip(trans('filament-forms::components.key_value.actions.delete.label'));
$action->tooltip(fn () => $action->getLabel());
$action->iconSize(IconSize::Large);
}));

Repeater::configureUsing(fn (Repeater $repeater) => $repeater->deleteAction(function (Action $action) {
$action->tooltip(trans('filament-forms::components.repeater.actions.delete.label'));
$action->tooltip(fn () => $action->getLabel());
$action->iconSize(IconSize::Large);
}));

ShowPasswordAction::configureUsing(function (ShowPasswordAction $action) {
$action->tooltip(trans('filament-forms::components.text_input.actions.show_password.label'));
$action->tooltip(fn () => $action->getLabel());
$action->iconSize(IconSize::Large);
});

HidePasswordAction::configureUsing(function (HidePasswordAction $action) {
$action->tooltip(trans('filament-forms::components.text_input.actions.hide_password.label'));
$action->tooltip(fn () => $action->getLabel());
$action->iconSize(IconSize::Large);
});

CopyAction::configureUsing(function (CopyAction $action) {
$action->tooltip(trans('filament-forms::components.text_input.actions.copy.label'));
$action->tooltip(fn () => $action->getLabel());
$action->iconSize(IconSize::Large);
});

DeleteAction::configureUsing(function (DeleteAction $action) {
$action->icon(TablerIcon::Trash);
$action->tooltip(trans('filament-actions::delete.single.modal.actions.delete.label'));
$action->tooltip(fn () => $action->getLabel());
$action->hiddenLabel();
$action->iconSize(IconSize::Large);

Expand All @@ -135,7 +135,9 @@ public function boot(): void
});

CreateAction::configureUsing(function (CreateAction $action) {
$action->tooltip(fn (): string => trans('filament-actions::create.single.label', ['label' => $action->getModelLabel()]));
$action->icon(TablerIcon::Plus);
$action->tooltip(fn () => $action->getLabel());
$action->hiddenLabel();
$action->iconSize(IconSize::Large);

if (user()?->getCustomization(CustomizationKey::ButtonStyle)) {
Expand All @@ -145,7 +147,9 @@ public function boot(): void
});

EditAction::configureUsing(function (EditAction $action) {
$action->tooltip(trans('filament-actions::edit.single.label'));
$action->icon(TablerIcon::Pencil);
$action->tooltip(fn () => $action->getLabel());
$action->hiddenLabel();
$action->iconSize(IconSize::Large);

if (user()?->getCustomization(CustomizationKey::ButtonStyle)) {
Expand All @@ -155,7 +159,9 @@ public function boot(): void
});

ViewAction::configureUsing(function (ViewAction $action) {
$action->tooltip(trans('filament-actions::view.single.label'));
$action->icon(TablerIcon::Eye);
$action->tooltip(fn () => $action->getLabel());
$action->hiddenLabel();
$action->iconSize(IconSize::Large);

if (user()?->getCustomization(CustomizationKey::ButtonStyle)) {
Expand All @@ -175,6 +181,7 @@ public function boot(): void
'disable_oauth_',
'enable_captcha_',
'disable_captcha_',
'oauth_',
'db_', // dashboard
'fm_', // file manager
'hint_', // hint actions
Expand Down
3 changes: 1 addition & 2 deletions lang/en/admin/webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
'no_webhooks' => 'No Webhooks',
'help' => 'Help',
'help_text' => 'You have to wrap variable name in between {{ }} for example if you want to get the name from the api you can use {{name}}.',
'test_now' => 'Test Now',
'test_now_help' => 'This will fire a `created: Server` event',
'test_now' => 'Test now',
'table' => [
'description' => 'Description',
'endpoint' => 'Endpoint',
Expand Down