Merge remote-tracking branch 'upstream/main' into filament-v4

This commit is contained in:
Boy132 2025-07-23 09:21:52 +02:00
commit 2d337188f1
9 changed files with 71 additions and 45 deletions

View File

@ -13,6 +13,7 @@ use Filament\Actions\Action;
use Filament\Actions\ActionGroup;
use Filament\Facades\Filament;
use Filament\Resources\Pages\ListRecords;
use Filament\Support\Enums\IconSize;
class ListAllocations extends ListRecords
{
@ -29,8 +30,10 @@ class ListAllocations extends ListRecords
return [
Action::make('addAllocation')
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon(fn () => $server->allocations()->count() >= $server->allocation_limit ? 'tabler-network-off' : 'tabler-network')
->authorize(fn () => auth()->user()->can(Permission::ACTION_ALLOCATION_CREATE, $server))
->label(fn () => $server->allocations()->count() >= $server->allocation_limit ? 'Allocation limit reached' : 'Add Allocation')
->tooltip(fn () => $server->allocations()->count() >= $server->allocation_limit ? 'Allocation limit reached' : 'Add Allocation')
->hidden(fn () => !config('panel.client_features.allocations.enabled'))
->disabled(fn () => $server->allocations()->count() >= $server->allocation_limit)
->color(fn () => $server->allocations()->count() >= $server->allocation_limit ? 'danger' : 'primary')

View File

@ -19,8 +19,7 @@ class ListBackups extends ListRecords
/** @return array<Action|ActionGroup> */
protected function getDefaultHeaderActions(): array
{
return [
];
return [];
}
public function getBreadcrumbs(): array

View File

@ -16,6 +16,7 @@ use Filament\Schemas\Components\Grid;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Resources\Pages\ListRecords;
use Filament\Support\Enums\IconSize;
class ListDatabases extends ListRecords
{
@ -32,7 +33,9 @@ class ListDatabases extends ListRecords
return [
CreateAction::make('new')
->label(fn () => $server->databases()->count() >= $server->database_limit ? 'Database limit reached' : 'Create Database')
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon(fn () => $server->databases()->count() >= $server->database_limit ? 'tabler-database-x' : 'tabler-database-plus')
->tooltip(fn () => $server->databases()->count() >= $server->database_limit ? 'Database limit reached' : 'Create Database')
->disabled(fn () => $server->databases()->count() >= $server->database_limit)
->color(fn () => $server->databases()->count() >= $server->database_limit ? 'danger' : 'primary')
->createAnother(false)

View File

@ -12,6 +12,7 @@ use Filament\Actions\DeleteAction;
use App\Traits\Filament\CanCustomizeHeaderWidgets;
use App\Traits\Filament\CanCustomizeHeaderActions;
use Filament\Resources\Pages\EditRecord;
use Filament\Support\Enums\IconSize;
class EditSchedule extends EditRecord
{
@ -48,14 +49,26 @@ class EditSchedule extends EditRecord
{
return [
DeleteAction::make()
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon('tabler-trash')
->tooltip('Delete Schedule')
->after(function ($record) {
Activity::event('server:schedule.delete')
->property('name', $record->name)
->log();
}),
ExportScheduleAction::make(),
$this->getSaveFormAction()->formId('form')->label('Save'),
$this->getCancelFormAction()->formId('form'),
ExportScheduleAction::make()
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon('tabler-download')
->tooltip('Export Schedule'),
$this->getSaveFormAction()->formId('form')
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon('tabler-device-floppy')
->tooltip('Save Schedule'),
$this->getCancelFormAction()->formId('form')
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon('tabler-cancel')
->tooltip('Cancel'),
];
}

View File

@ -14,6 +14,7 @@ use Filament\Actions\ActionGroup;
use Filament\Actions\EditAction;
use Filament\Facades\Filament;
use Filament\Resources\Pages\ViewRecord;
use Filament\Support\Enums\IconSize;
class ViewSchedule extends ViewRecord
{
@ -41,7 +42,10 @@ class ViewSchedule extends ViewRecord
$this->fillForm();
}),
EditAction::make(),
EditAction::make()
->hiddenLabel()->iconButton()->iconSize(IconSize::Large)
->icon('tabler-calendar-code')
->tooltip('Edit Schedule'),
];
}

View File

@ -47,6 +47,7 @@ class EggTransformer extends BaseTransformer
'author' => $model->author,
'description' => $model->description,
'features' => $model->features,
'tags' => $model->tags,
// "docker_image" is deprecated, but left here to avoid breaking too many things at once
// in external software. We'll remove it down the road once things have gotten the chance
// to upgrade to using "docker_images".

View File

@ -9,13 +9,13 @@
"ext-mbstring": "*",
"ext-pdo": "*",
"ext-zip": "*",
"aws/aws-sdk-php": "^3.344",
"aws/aws-sdk-php": "^3.351",
"calebporzio/sushi": "^2.5",
"dedoc/scramble": "^0.12.10",
"doctrine/dbal": "~3.6.0",
"filament/filament": "~4.0",
"guzzlehttp/guzzle": "^7.9",
"laravel/framework": "^12.20",
"laravel/framework": "^12.21",
"laravel/helpers": "^1.7",
"laravel/sanctum": "^4.1",
"laravel/socialite": "^5.21",
@ -31,10 +31,10 @@
"socialiteproviders/authentik": "^5.2",
"socialiteproviders/discord": "^4.2",
"socialiteproviders/steam": "^4.3",
"spatie/laravel-data": "^4.15",
"spatie/laravel-data": "^4.17",
"spatie/laravel-fractal": "^6.3",
"spatie/laravel-health": "^1.34",
"spatie/laravel-permission": "^6.19",
"spatie/laravel-permission": "^6.20",
"spatie/laravel-query-builder": "^6.3",
"spatie/temporary-directory": "^2.3",
"symfony/http-client": "^7.2",
@ -44,7 +44,7 @@
"webmozart/assert": "~1.11.0"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^3.5",
"barryvdh/laravel-ide-helper": "^3.6",
"fakerphp/faker": "^1.23.1",
"larastan/larastan": "^3.4",
"laravel/pail": "^1.2.2",

52
composer.lock generated
View File

@ -3643,16 +3643,16 @@
},
{
"name": "laravel/framework",
"version": "v12.20.0",
"version": "v12.21.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "1b9a00f8caf5503c92aa436279172beae1a484ff"
"reference": "ac8c4e73bf1b5387b709f7736d41427e6af1c93b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/1b9a00f8caf5503c92aa436279172beae1a484ff",
"reference": "1b9a00f8caf5503c92aa436279172beae1a484ff",
"url": "https://api.github.com/repos/laravel/framework/zipball/ac8c4e73bf1b5387b709f7736d41427e6af1c93b",
"reference": "ac8c4e73bf1b5387b709f7736d41427e6af1c93b",
"shasum": ""
},
"require": {
@ -3854,7 +3854,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2025-07-08T15:02:21+00:00"
"time": "2025-07-22T15:41:55+00:00"
},
{
"name": "laravel/helpers",
@ -3974,16 +3974,16 @@
},
{
"name": "laravel/sanctum",
"version": "v4.1.2",
"version": "v4.2.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sanctum.git",
"reference": "e4c09e69aecd5a383e0c1b85a6bb501c997d7491"
"reference": "fd6df4f79f48a72992e8d29a9c0ee25422a0d677"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sanctum/zipball/e4c09e69aecd5a383e0c1b85a6bb501c997d7491",
"reference": "e4c09e69aecd5a383e0c1b85a6bb501c997d7491",
"url": "https://api.github.com/repos/laravel/sanctum/zipball/fd6df4f79f48a72992e8d29a9c0ee25422a0d677",
"reference": "fd6df4f79f48a72992e8d29a9c0ee25422a0d677",
"shasum": ""
},
"require": {
@ -4034,7 +4034,7 @@
"issues": "https://github.com/laravel/sanctum/issues",
"source": "https://github.com/laravel/sanctum"
},
"time": "2025-07-01T15:49:32+00:00"
"time": "2025-07-09T19:45:24+00:00"
},
{
"name": "laravel/serializable-closure",
@ -4099,16 +4099,16 @@
},
{
"name": "laravel/socialite",
"version": "v5.21.0",
"version": "v5.22.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/socialite.git",
"reference": "d83639499ad14985c9a6a9713b70073300ce998d"
"reference": "99d0fe750a7c68e5b60d8b1850de2554f3ea4072"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/socialite/zipball/d83639499ad14985c9a6a9713b70073300ce998d",
"reference": "d83639499ad14985c9a6a9713b70073300ce998d",
"url": "https://api.github.com/repos/laravel/socialite/zipball/99d0fe750a7c68e5b60d8b1850de2554f3ea4072",
"reference": "99d0fe750a7c68e5b60d8b1850de2554f3ea4072",
"shasum": ""
},
"require": {
@ -4167,7 +4167,7 @@
"issues": "https://github.com/laravel/socialite/issues",
"source": "https://github.com/laravel/socialite"
},
"time": "2025-05-19T12:56:37+00:00"
"time": "2025-07-08T22:07:57+00:00"
},
{
"name": "laravel/tinker",
@ -8195,16 +8195,16 @@
},
{
"name": "secondnetwork/blade-tabler-icons",
"version": "v3.34.0",
"version": "v3.34.1",
"source": {
"type": "git",
"url": "https://github.com/secondnetwork/blade-tabler-icons.git",
"reference": "e48c0a5a53798d42c7beff760de8cbc7dbbccff4"
"reference": "7d0ccb01eb878cf5a5df306967b59242d3615811"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/secondnetwork/blade-tabler-icons/zipball/e48c0a5a53798d42c7beff760de8cbc7dbbccff4",
"reference": "e48c0a5a53798d42c7beff760de8cbc7dbbccff4",
"url": "https://api.github.com/repos/secondnetwork/blade-tabler-icons/zipball/7d0ccb01eb878cf5a5df306967b59242d3615811",
"reference": "7d0ccb01eb878cf5a5df306967b59242d3615811",
"shasum": ""
},
"require": {
@ -8247,9 +8247,9 @@
],
"support": {
"issues": "https://github.com/secondnetwork/blade-tabler-icons/issues",
"source": "https://github.com/secondnetwork/blade-tabler-icons/tree/v3.34.0"
"source": "https://github.com/secondnetwork/blade-tabler-icons/tree/v3.34.1"
},
"time": "2025-06-09T08:41:55+00:00"
"time": "2025-07-22T15:28:08+00:00"
},
{
"name": "socialiteproviders/authentik",
@ -13423,16 +13423,16 @@
},
{
"name": "laravel/sail",
"version": "v1.43.1",
"version": "v1.44.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "3e7d899232a8c5e3ea4fc6dee7525ad583887e72"
"reference": "a09097bd2a8a38e23ac472fa6a6cf5b0d1c1d3fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/3e7d899232a8c5e3ea4fc6dee7525ad583887e72",
"reference": "3e7d899232a8c5e3ea4fc6dee7525ad583887e72",
"url": "https://api.github.com/repos/laravel/sail/zipball/a09097bd2a8a38e23ac472fa6a6cf5b0d1c1d3fe",
"reference": "a09097bd2a8a38e23ac472fa6a6cf5b0d1c1d3fe",
"shasum": ""
},
"require": {
@ -13482,7 +13482,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2025-05-19T13:19:21+00:00"
"time": "2025-07-04T16:17:06+00:00"
},
{
"name": "mockery/mockery",

View File

@ -23,11 +23,11 @@ To start contributing to Pelican Panel, you need to have a basic understanding o
As IDE we recommend [Visual Studio](https://visualstudio.microsoft.com)/ [Visual Studio Code](https://code.visualstudio.com) (free) or [PhpStorm](https://www.jetbrains.com/phpstorm) (paid).
To easily install PHP and the Webserver we recommend Laravel Herd. ([Windows](https://herd.laravel.com/windows) & [macOS](https://herd.laravel.com))
The (paid) Pro version of Laravel Herd also offers easy MySQL and Redis hosting, but it is not needed.
The (paid) Pro version of Laravel Herd also offers easy MySQL and Redis hosting, but the free version is fine for most cases.
## Coding Standards
We use PHPStan/ [Larastan](https://github.com/larastan/larastan) and PHP-CS-Fixer/ [Pint](https://laravel.com/docs/11.x/pint) to enforce certain code styles and standards.
We use PHPStan/ [Larastan](https://github.com/larastan/larastan) and PHP-CS-Fixer/ [Pint](https://laravel.com/docs/12.x/pint) to enforce certain code styles and standards.
You can run PHPStan via `\vendor\bin\phpstan analyse` and Pint via `\vendor\bin\pint`.
## Making Contributions
@ -37,7 +37,10 @@ When you are ready, you can submit a pull request to the Pelican repository. If
Also, please make sure that your pull requests are as targeted and simple as possible and don't do a hundred things at a time. If you want to add/ change/ fix 5 different things you should make 5 different pull requests.
*Note: For now we only accept pull requests that handle existing issues!*
### Translations
If you add any new translation strings make sure to only add them to english.
Other languages are translated via [Crowdin](https://crowdin.com/project/pelican-dev).
## Code Review Process