diff --git a/app/Extensions/Features/GSLToken.php b/app/Extensions/Features/GSLToken.php index c4fc8508c..b46fd9c0f 100644 --- a/app/Extensions/Features/GSLToken.php +++ b/app/Extensions/Features/GSLToken.php @@ -10,8 +10,8 @@ use App\Repositories\Daemon\DaemonPowerRepository; use Closure; use Filament\Actions\Action; use Filament\Facades\Filament; -use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\TextInput; +use Filament\Infolists\Components\TextEntry; use Filament\Notifications\Notification; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Validator; @@ -37,6 +37,9 @@ class GSLToken extends FeatureProvider return 'gsltoken'; } + /** + * @throws \Exception + */ public function getAction(): Action { /** @var Server $server */ @@ -50,9 +53,9 @@ class GSLToken extends FeatureProvider ->modalHeading('Invalid GSL token') ->modalDescription('It seems like your Gameserver Login Token (GSL token) is invalid or has expired.') ->modalSubmitActionLabel('Update GSL Token') - ->disabledForm(fn () => !auth()->user()->can(Permission::ACTION_STARTUP_UPDATE, $server)) - ->form([ - Placeholder::make('java') + ->disabledSchema(fn () => !auth()->user()->can(Permission::ACTION_STARTUP_UPDATE, $server)) + ->schema([ + TextEntry::make('java') ->label('You can either generate a new one and enter it below or leave the field blank to remove it completely.'), TextInput::make('gsltoken') diff --git a/app/Extensions/Features/JavaVersion.php b/app/Extensions/Features/JavaVersion.php index d7f5b80d1..4991e20a7 100644 --- a/app/Extensions/Features/JavaVersion.php +++ b/app/Extensions/Features/JavaVersion.php @@ -48,7 +48,7 @@ class JavaVersion extends FeatureProvider ->modalDescription('This server is currently running an unsupported version of Java and cannot be started.') ->modalSubmitActionLabel('Update Docker Image') ->disabledForm(fn () => !auth()->user()->can(Permission::ACTION_STARTUP_DOCKER_IMAGE, $server)) - ->form([ + ->schema([ Placeholder::make('java') ->label('Please select a supported version from the list below to continue starting the server.'), Select::make('image') diff --git a/app/Filament/Admin/Pages/Dashboard.php b/app/Filament/Admin/Pages/Dashboard.php index 41bd33c1d..30622aadd 100644 --- a/app/Filament/Admin/Pages/Dashboard.php +++ b/app/Filament/Admin/Pages/Dashboard.php @@ -7,7 +7,7 @@ use Filament\Pages\Dashboard as BaseDashboard; class Dashboard extends BaseDashboard { - protected static string|\BackedEnum|null $navigationIcon = 'tabler-layout-dashboard'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-layout-dashboard'; private SoftwareVersionService $softwareVersionService; diff --git a/app/Filament/Admin/Pages/Health.php b/app/Filament/Admin/Pages/Health.php index 47749ef91..0fa5d4aaf 100644 --- a/app/Filament/Admin/Pages/Health.php +++ b/app/Filament/Admin/Pages/Health.php @@ -13,7 +13,7 @@ use Spatie\Health\ResultStores\ResultStore; class Health extends Page { - protected static string|\BackedEnum|null $navigationIcon = 'tabler-heart'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-heart'; protected string $view = 'filament.pages.health'; diff --git a/app/Filament/Admin/Pages/Settings.php b/app/Filament/Admin/Pages/Settings.php index e33824d23..3a64c491d 100644 --- a/app/Filament/Admin/Pages/Settings.php +++ b/app/Filament/Admin/Pages/Settings.php @@ -45,7 +45,7 @@ class Settings extends Page implements HasSchemas use InteractsWithForms; use InteractsWithHeaderActions; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-settings'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-settings'; protected string $view = 'filament.pages.settings'; diff --git a/app/Filament/Admin/Resources/ApiKeyResource.php b/app/Filament/Admin/Resources/ApiKeyResource.php index 26317f7e3..7b5a301d5 100644 --- a/app/Filament/Admin/Resources/ApiKeyResource.php +++ b/app/Filament/Admin/Resources/ApiKeyResource.php @@ -22,7 +22,7 @@ class ApiKeyResource extends Resource { protected static ?string $model = ApiKey::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-key'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-key'; public static function getNavigationLabel(): string { diff --git a/app/Filament/Admin/Resources/DatabaseHostResource.php b/app/Filament/Admin/Resources/DatabaseHostResource.php index 36f4ec9ae..9f7370231 100644 --- a/app/Filament/Admin/Resources/DatabaseHostResource.php +++ b/app/Filament/Admin/Resources/DatabaseHostResource.php @@ -21,7 +21,7 @@ class DatabaseHostResource extends Resource { protected static ?string $model = DatabaseHost::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-database'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-database'; protected static ?string $recordTitleAttribute = 'name'; @@ -91,7 +91,7 @@ class DatabaseHostResource extends Resource public static function form(Schema $schema): Schema { return $schema - ->schema([ + ->components([ Section::make() ->columnSpanFull() ->columns([ diff --git a/app/Filament/Admin/Resources/EggResource.php b/app/Filament/Admin/Resources/EggResource.php index 65a0e3ba0..fad22565c 100644 --- a/app/Filament/Admin/Resources/EggResource.php +++ b/app/Filament/Admin/Resources/EggResource.php @@ -10,7 +10,7 @@ class EggResource extends Resource { protected static ?string $model = Egg::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-eggs'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-eggs'; protected static ?string $recordTitleAttribute = 'name'; diff --git a/app/Filament/Admin/Resources/MountResource.php b/app/Filament/Admin/Resources/MountResource.php index fa8e46a58..9f62ad0ac 100644 --- a/app/Filament/Admin/Resources/MountResource.php +++ b/app/Filament/Admin/Resources/MountResource.php @@ -23,7 +23,7 @@ class MountResource extends Resource { protected static ?string $model = Mount::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-layers-linked'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-layers-linked'; protected static ?string $recordTitleAttribute = 'name'; diff --git a/app/Filament/Admin/Resources/NodeResource.php b/app/Filament/Admin/Resources/NodeResource.php index 12d640c8a..e4ddf5d2e 100644 --- a/app/Filament/Admin/Resources/NodeResource.php +++ b/app/Filament/Admin/Resources/NodeResource.php @@ -11,7 +11,7 @@ class NodeResource extends Resource { protected static ?string $model = Node::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-server-2'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-server-2'; protected static ?string $recordTitleAttribute = 'name'; diff --git a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php index 4ec117dcf..9f80350b1 100644 --- a/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php +++ b/app/Filament/Admin/Resources/NodeResource/Pages/EditNode.php @@ -48,7 +48,7 @@ class EditNode extends EditRecord public function form(Schema $schema): Schema { - return $schema->schema([ + return $schema->components([ Tabs::make('Tabs') ->columns([ 'default' => 2, diff --git a/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php b/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php index 614e6c68b..af02f9ef3 100644 --- a/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php +++ b/app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php @@ -27,7 +27,7 @@ class AllocationsRelationManager extends RelationManager { protected static string $relationship = 'allocations'; - protected static string|\BackedEnum|null $icon = 'tabler-plug-connected'; + protected static string | \BackedEnum | null $icon = 'tabler-plug-connected'; public function setTitle(): string { diff --git a/app/Filament/Admin/Resources/NodeResource/RelationManagers/NodesRelationManager.php b/app/Filament/Admin/Resources/NodeResource/RelationManagers/NodesRelationManager.php index 75bf98626..f851a1215 100644 --- a/app/Filament/Admin/Resources/NodeResource/RelationManagers/NodesRelationManager.php +++ b/app/Filament/Admin/Resources/NodeResource/RelationManagers/NodesRelationManager.php @@ -12,7 +12,7 @@ class NodesRelationManager extends RelationManager { protected static string $relationship = 'servers'; - protected static string|\BackedEnum|null $icon = 'tabler-brand-docker'; + protected static string | \BackedEnum | null $icon = 'tabler-brand-docker'; public function setTitle(): string { diff --git a/app/Filament/Admin/Resources/RoleResource.php b/app/Filament/Admin/Resources/RoleResource.php index e0ae3cc29..ebae491a9 100644 --- a/app/Filament/Admin/Resources/RoleResource.php +++ b/app/Filament/Admin/Resources/RoleResource.php @@ -28,7 +28,7 @@ class RoleResource extends Resource { protected static ?string $model = Role::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-users-group'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-users-group'; protected static ?string $recordTitleAttribute = 'name'; @@ -110,7 +110,7 @@ class RoleResource extends Resource return $schema ->columns(1) - ->schema([ + ->components([ TextInput::make('name') ->label(trans('admin/role.name')) ->required() diff --git a/app/Filament/Admin/Resources/ServerResource.php b/app/Filament/Admin/Resources/ServerResource.php index e1e2c2c91..8dc5ffcbc 100644 --- a/app/Filament/Admin/Resources/ServerResource.php +++ b/app/Filament/Admin/Resources/ServerResource.php @@ -10,7 +10,7 @@ class ServerResource extends Resource { protected static ?string $model = Server::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-brand-docker'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-brand-docker'; protected static ?string $recordTitleAttribute = 'name'; diff --git a/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php b/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php index ce7a427a5..d3f91cf04 100644 --- a/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php +++ b/app/Filament/Admin/Resources/ServerResource/Pages/EditServer.php @@ -76,7 +76,7 @@ class EditServer extends EditRecord public function form(Schema $schema): Schema { return $schema - ->schema([ + ->components([ Tabs::make('Tabs') ->persistTabInQueryString() ->columns([ diff --git a/app/Filament/Admin/Resources/UserResource.php b/app/Filament/Admin/Resources/UserResource.php index 6035bfa5b..bd1b75963 100644 --- a/app/Filament/Admin/Resources/UserResource.php +++ b/app/Filament/Admin/Resources/UserResource.php @@ -24,7 +24,7 @@ class UserResource extends Resource { protected static ?string $model = User::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-users'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-users'; protected static ?string $recordTitleAttribute = 'username'; @@ -105,7 +105,7 @@ class UserResource extends Resource { return $schema ->columns(['default' => 1, 'lg' => 3]) - ->schema([ + ->components([ TextInput::make('username') ->label(trans('admin/user.username')) ->alphaNum() diff --git a/app/Filament/Admin/Resources/WebhookResource.php b/app/Filament/Admin/Resources/WebhookResource.php index bbd4f40b3..68b9f59b2 100644 --- a/app/Filament/Admin/Resources/WebhookResource.php +++ b/app/Filament/Admin/Resources/WebhookResource.php @@ -21,7 +21,7 @@ class WebhookResource extends Resource { protected static ?string $model = WebhookConfiguration::class; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-webhook'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-webhook'; protected static ?string $recordTitleAttribute = 'description'; diff --git a/app/Filament/Server/Pages/Console.php b/app/Filament/Server/Pages/Console.php index 382e75831..aa765596e 100644 --- a/app/Filament/Server/Pages/Console.php +++ b/app/Filament/Server/Pages/Console.php @@ -25,7 +25,7 @@ use Livewire\Attributes\On; class Console extends Page { - protected static string|\BackedEnum|null $navigationIcon = 'tabler-brand-tabler'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-brand-tabler'; protected static ?int $navigationSort = 1; diff --git a/app/Filament/Server/Pages/Settings.php b/app/Filament/Server/Pages/Settings.php index 1874ebf37..29528d6f4 100644 --- a/app/Filament/Server/Pages/Settings.php +++ b/app/Filament/Server/Pages/Settings.php @@ -21,7 +21,7 @@ use Illuminate\Support\Number; class Settings extends ServerFormPage { - protected static string|\BackedEnum|null $navigationIcon = 'tabler-settings'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-settings'; protected static ?int $navigationSort = 10; @@ -40,7 +40,7 @@ class Settings extends ServerFormPage 'md' => 4, 'lg' => 6, ]) - ->schema([ + ->components([ Section::make('Server Information') ->columns([ 'default' => 1, diff --git a/app/Filament/Server/Pages/Startup.php b/app/Filament/Server/Pages/Startup.php index 38d6fd799..7290071f4 100644 --- a/app/Filament/Server/Pages/Startup.php +++ b/app/Filament/Server/Pages/Startup.php @@ -23,7 +23,7 @@ use Illuminate\Support\Facades\Validator; class Startup extends ServerFormPage { - protected static string|\BackedEnum|null $navigationIcon = 'tabler-player-play'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-player-play'; protected static ?int $navigationSort = 9; @@ -42,7 +42,7 @@ class Startup extends ServerFormPage 'md' => 4, 'lg' => 6, ]) - ->schema([ + ->components([ Hidden::make('previewing') ->default(false), Textarea::make('startup') diff --git a/app/Filament/Server/Resources/ActivityResource.php b/app/Filament/Server/Resources/ActivityResource.php index 98c19cf16..dee44e5b2 100644 --- a/app/Filament/Server/Resources/ActivityResource.php +++ b/app/Filament/Server/Resources/ActivityResource.php @@ -23,7 +23,7 @@ class ActivityResource extends Resource protected static ?int $navigationSort = 8; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-stack'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-stack'; public static function getEloquentQuery(): Builder { diff --git a/app/Filament/Server/Resources/AllocationResource.php b/app/Filament/Server/Resources/AllocationResource.php index 58177db25..1ee28adb5 100644 --- a/app/Filament/Server/Resources/AllocationResource.php +++ b/app/Filament/Server/Resources/AllocationResource.php @@ -20,7 +20,7 @@ class AllocationResource extends Resource protected static ?int $navigationSort = 7; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-network'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-network'; // TODO: find better way handle server conflict state public static function canAccess(): bool diff --git a/app/Filament/Server/Resources/BackupResource.php b/app/Filament/Server/Resources/BackupResource.php index 69fc30ff2..bbe07c91c 100644 --- a/app/Filament/Server/Resources/BackupResource.php +++ b/app/Filament/Server/Resources/BackupResource.php @@ -16,7 +16,7 @@ class BackupResource extends Resource protected static ?int $navigationSort = 3; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-file-zip'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-file-zip'; protected static bool $canCreateAnother = false; diff --git a/app/Filament/Server/Resources/DatabaseResource.php b/app/Filament/Server/Resources/DatabaseResource.php index 6b0e95261..22a178c91 100644 --- a/app/Filament/Server/Resources/DatabaseResource.php +++ b/app/Filament/Server/Resources/DatabaseResource.php @@ -16,7 +16,7 @@ class DatabaseResource extends Resource protected static ?int $navigationSort = 6; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-database'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-database'; public const WARNING_THRESHOLD = 0.7; diff --git a/app/Filament/Server/Resources/FileResource.php b/app/Filament/Server/Resources/FileResource.php index 332df4f94..94d9d7bc1 100644 --- a/app/Filament/Server/Resources/FileResource.php +++ b/app/Filament/Server/Resources/FileResource.php @@ -16,7 +16,7 @@ class FileResource extends Resource protected static ?int $navigationSort = 2; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-files'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-files'; // TODO: find better way handle server conflict state public static function canAccess(): bool diff --git a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php index b0c1e4a2a..99fd6089c 100644 --- a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php +++ b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php @@ -2,6 +2,7 @@ namespace App\Filament\Server\Resources\FileResource\Pages; +//use AbdelhamidErrahmouni\FilamentMonacoEditor\MonacoEditor; use App\Enums\EditorLanguages; use App\Facades\Activity; use App\Filament\Server\Resources\FileResource; @@ -11,27 +12,25 @@ use App\Models\Server; use App\Repositories\Daemon\DaemonFileRepository; use App\Filament\Components\Tables\Columns\BytesColumn; use App\Filament\Components\Tables\Columns\DateTimeColumn; -use Filament\Actions\Action as HeaderAction; +use Filament\Actions\Action; +use Filament\Actions\ActionGroup; +use Filament\Actions\BulkAction; +use Filament\Actions\DeleteAction; +use Filament\Actions\DeleteBulkAction; +use Filament\Actions\EditAction; use Filament\Facades\Filament; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\FileUpload; -use Filament\Infolists\Components\TextEntry; use Filament\Forms\Components\Select; -use Filament\Schemas\Components\Tabs; -use Filament\Schemas\Components\Tabs\Tab; use Filament\Forms\Components\TextInput; -use Filament\Schemas\Components\Utilities\Get; +use Filament\Infolists\Components\TextEntry; use Filament\Notifications\Notification; use Filament\Panel; use Filament\Resources\Pages\ListRecords; use Filament\Resources\Pages\PageRegistration; -use Filament\Actions\Action; -use Filament\Actions\ActionGroup; -use Filament\Actions\BulkAction; -use Filament\Actions\BulkActionGroup; -use Filament\Actions\DeleteAction; -use Filament\Actions\DeleteBulkAction; -use Filament\Actions\EditAction; +use Filament\Schemas\Components\Tabs; +use Filament\Schemas\Components\Tabs\Tab; +use Filament\Schemas\Components\Utilities\Get; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Collection; @@ -40,7 +39,6 @@ use Illuminate\Routing\Route; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Route as RouteFacade; use Livewire\Attributes\Locked; -use Filament\Forms\Components\RichEditor; class ListFiles extends ListRecords { @@ -75,6 +73,9 @@ class ListFiles extends ListRecords return $breadcrumbs; } + /** + * @throws \Exception + */ public function table(Table $table): Table { /** @var Server $server */ @@ -333,20 +334,20 @@ class ListFiles extends ListRecords ->log(); }), ]) - $location = rtrim($data['location'], '/'); - ]) - ->action(function (Collection $files, $data) { - ->content(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))), - Placeholder::make('new_location') - ->live(), - ->required() - ->hint('Enter the new directory, relative to the current directory.') - ->label('Directory') - ->form([ - TextInput::make('location') - ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) ->groupedBulkActions([ BulkAction::make('move') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_UPDATE, $server)) + ->schema([ + TextInput::make('location') + ->label('Directory') + ->hint('Enter the new directory, relative to the current directory.') + ->required() + ->live(), + TextEntry::make('new_location') + ->state(fn (Get $get) => resolve_path('./' . join_paths($this->path, $get('location') ?? ''))), + ]) + ->action(function (Collection $files, $data) { + $location = rtrim($data['location'], '/'); $files = $files->map(fn ($file) => ['to' => join_paths($location, $file['name']), 'from' => $file['name']])->toArray(); $this->getDaemonFileRepository()->renameFiles($this->path, $files); @@ -356,21 +357,21 @@ class ListFiles extends ListRecords ->property('files', $files) ->log(); - $files = $files->map(fn ($file) => $file['name'])->toArray(); - ->action(function ($data, Collection $files) { - ]) - ->suffix('.tar.gz'), - ->placeholder(fn () => 'archive-' . str(Carbon::now()->toRfc3339String())->replace(':', '')->before('+0000') . 'Z') - ->label('Archive name') - ->form([ - TextInput::make('name') - ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_ARCHIVE, $server)) - BulkAction::make('archive') - ->success() - ->title(count($files) . ' Files were moved to ' . resolve_path(join_paths($this->path, $location))) Notification::make() - }), + ->title(count($files) . ' Files were moved to ' . resolve_path(join_paths($this->path, $location))) + ->success() ->send(); + }), + BulkAction::make('archive') + ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_ARCHIVE, $server)) + ->schema([ + TextInput::make('name') + ->label('Archive name') + ->placeholder(fn () => 'archive-' . str(Carbon::now()->toRfc3339String())->replace(':', '')->before('+0000') . 'Z') + ->suffix('.tar.gz'), + ]) + ->action(function ($data, Collection $files) { + $files = $files->map(fn ($file) => $file['name'])->toArray(); $archive = $this->getDaemonFileRepository()->compressFiles($this->path, $files, $data['name']); @@ -413,7 +414,7 @@ class ListFiles extends ListRecords $server = Filament::getTenant(); return [ - HeaderAction::make('new_file') + Action::make('new_file') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) ->label('New File') ->color('gray') @@ -439,12 +440,12 @@ class ListFiles extends ListRecords ->selectablePlaceholder(false) ->afterStateUpdated(fn ($state) => $this->dispatch('setLanguage', lang: $state)) ->default(EditorLanguages::plaintext->value), - RichEditor::make('editor') - ->label(''), - //->view('filament.plugins.monaco-editor') - //->language(fn (Get $get) => $get('lang') ?? 'plaintext'), + // MonacoEditor::make('editor') + // ->label('') + // ->view('filament.plugins.monaco-editor') + // ->language(fn (Get $get) => $get('lang') ?? 'plaintext'), ]), - HeaderAction::make('new_folder') + Action::make('new_folder') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) ->label('New Folder') ->color('gray') @@ -460,7 +461,7 @@ class ListFiles extends ListRecords ->label('Folder Name') ->required(), ]), - HeaderAction::make('upload') + Action::make('upload') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_CREATE, $server)) ->label('Upload') ->action(function ($data) { @@ -509,7 +510,7 @@ class ListFiles extends ListRecords ]), ]), ]), - HeaderAction::make('search') + Action::make('search') ->authorize(fn () => auth()->user()->can(Permission::ACTION_FILE_READ, $server)) ->label('Global Search') ->modalSubmitActionLabel('Search') diff --git a/app/Filament/Server/Resources/ScheduleResource.php b/app/Filament/Server/Resources/ScheduleResource.php index e64d976f1..87b477bc2 100644 --- a/app/Filament/Server/Resources/ScheduleResource.php +++ b/app/Filament/Server/Resources/ScheduleResource.php @@ -33,7 +33,7 @@ class ScheduleResource extends Resource protected static ?int $navigationSort = 4; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-clock'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-clock'; // TODO: find better way handle server conflict state public static function canAccess(): bool diff --git a/app/Filament/Server/Resources/UserResource.php b/app/Filament/Server/Resources/UserResource.php index c1a71fa51..b895d5b57 100644 --- a/app/Filament/Server/Resources/UserResource.php +++ b/app/Filament/Server/Resources/UserResource.php @@ -33,7 +33,7 @@ class UserResource extends Resource protected static ?int $navigationSort = 5; - protected static string|\BackedEnum|null $navigationIcon = 'tabler-users'; + protected static string | \BackedEnum | null $navigationIcon = 'tabler-users'; protected static ?string $tenantOwnershipRelationshipName = 'subServers'; diff --git a/composer.lock b/composer.lock index 36a6e65cc..800a96a5f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e8fa9e5978e5f6f11a110124a4994051", + "content-hash": "f51b79ee140902eca3032c03f5feca08", "packages": [ { "name": "amphp/amp", @@ -936,16 +936,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.343.0", + "version": "3.343.1", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8750298282f7f6f3fc65e43ae37a64bfc055100a" + "reference": "b24383b59b0fc039cecffe0bd7453ae514b22ed5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8750298282f7f6f3fc65e43ae37a64bfc055100a", - "reference": "8750298282f7f6f3fc65e43ae37a64bfc055100a", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b24383b59b0fc039cecffe0bd7453ae514b22ed5", + "reference": "b24383b59b0fc039cecffe0bd7453ae514b22ed5", "shasum": "" }, "require": { @@ -1027,9 +1027,9 @@ "support": { "forum": "https://github.com/aws/aws-sdk-php/discussions", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.343.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.343.1" }, - "time": "2025-04-29T18:04:08+00:00" + "time": "2025-04-30T18:21:17+00:00" }, { "name": "blade-ui-kit/blade-heroicons", @@ -3638,16 +3638,16 @@ }, { "name": "laravel/framework", - "version": "v12.11.0", + "version": "v12.11.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "050b2dfeaf6fff9e08e84b355822636492fb45f4" + "reference": "bd0d62bd9c5196728e428cd695d89ec8640daac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/050b2dfeaf6fff9e08e84b355822636492fb45f4", - "reference": "050b2dfeaf6fff9e08e84b355822636492fb45f4", + "url": "https://api.github.com/repos/laravel/framework/zipball/bd0d62bd9c5196728e428cd695d89ec8640daac1", + "reference": "bd0d62bd9c5196728e428cd695d89ec8640daac1", "shasum": "" }, "require": { @@ -3849,7 +3849,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2025-04-29T20:18:16+00:00" + "time": "2025-04-30T13:48:39+00:00" }, { "name": "laravel/helpers", @@ -7049,16 +7049,16 @@ }, { "name": "predis/predis", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/predis/predis.git", - "reference": "bac46bfdb78cd6e9c7926c697012aae740cb9ec9" + "reference": "f49e13ee3a2a825631562aa0223ac922ec5d058b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/bac46bfdb78cd6e9c7926c697012aae740cb9ec9", - "reference": "bac46bfdb78cd6e9c7926c697012aae740cb9ec9", + "url": "https://api.github.com/repos/predis/predis/zipball/f49e13ee3a2a825631562aa0223ac922ec5d058b", + "reference": "f49e13ee3a2a825631562aa0223ac922ec5d058b", "shasum": "" }, "require": { @@ -7067,6 +7067,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.3", "phpstan/phpstan": "^1.9", + "phpunit/phpcov": "^6.0 || ^8.0", "phpunit/phpunit": "^8.0 || ^9.4" }, "suggest": { @@ -7089,7 +7090,7 @@ "role": "Maintainer" } ], - "description": "A flexible and feature-complete Redis client for PHP.", + "description": "A flexible and feature-complete Redis/Valkey client for PHP.", "homepage": "http://github.com/predis/predis", "keywords": [ "nosql", @@ -7098,7 +7099,7 @@ ], "support": { "issues": "https://github.com/predis/predis/issues", - "source": "https://github.com/predis/predis/tree/v2.3.0" + "source": "https://github.com/predis/predis/tree/v2.4.0" }, "funding": [ { @@ -7106,7 +7107,7 @@ "type": "github" } ], - "time": "2024-11-21T20:00:02+00:00" + "time": "2025-04-30T15:16:02+00:00" }, { "name": "psr/cache", @@ -12976,16 +12977,16 @@ }, { "name": "hamcrest/hamcrest-php", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "99ec86beb7da3604d57cd3ca3699d2853f53018d" + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/99ec86beb7da3604d57cd3ca3699d2853f53018d", - "reference": "99ec86beb7da3604d57cd3ca3699d2853f53018d", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", "shasum": "" }, "require": { @@ -13021,9 +13022,9 @@ ], "support": { "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.0" + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" }, - "time": "2025-04-29T18:09:42+00:00" + "time": "2025-04-30T06:54:44+00:00" }, { "name": "iamcal/sql-parser", @@ -16148,5 +16149,5 @@ "platform-overrides": { "php": "8.2" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" }