mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
migration script
# Conflicts: # app/Filament/Resources/Torrent/AnnounceLogResource.php
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\System\SeedBoxRecordResource\Pages;
|
||||
|
||||
use Exception;
|
||||
use App\Filament\Resources\System\SeedBoxRecordResource;
|
||||
use App\Models\SeedBoxRecord;
|
||||
use App\Repositories\SeedBoxRepository;
|
||||
@@ -33,7 +34,7 @@ class CreateSeedBoxRecord extends CreateRecord
|
||||
return;
|
||||
}
|
||||
$this->redirect($this->getResource()::getUrl('index'));
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
send_admin_fail_notification($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\System\SeedBoxRecordResource\Pages;
|
||||
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Exception;
|
||||
use App\Filament\Resources\System\SeedBoxRecordResource;
|
||||
use App\Repositories\SeedBoxRepository;
|
||||
use Filament\Pages\Actions;
|
||||
@@ -14,7 +16,7 @@ class EditSeedBoxRecord extends EditRecord
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -26,7 +28,7 @@ class EditSeedBoxRecord extends EditRecord
|
||||
$this->record = $rep->update($data, $this->record->id);
|
||||
send_admin_success_notification();
|
||||
$this->redirect($this->getResource()::getUrl('index'));
|
||||
} catch (\Exception $exception) {
|
||||
} catch (Exception $exception) {
|
||||
send_admin_fail_notification($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace App\Filament\Resources\System\SeedBoxRecordResource\Pages;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use App\Filament\PageList;
|
||||
use App\Filament\Resources\System\SeedBoxRecordResource;
|
||||
use App\Repositories\SeedBoxRepository;
|
||||
@@ -18,12 +21,12 @@ class ListSeedBoxRecords extends PageList
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
Actions\Action::make('check')
|
||||
CreateAction::make(),
|
||||
Action::make('check')
|
||||
->label(__('admin.resources.seed_box_record.check_modal_btn'))
|
||||
->form([
|
||||
Forms\Components\TextInput::make('ip')->required()->label('IP'),
|
||||
Forms\Components\TextInput::make('uid')->required()->label('UID'),
|
||||
->schema([
|
||||
TextInput::make('ip')->required()->label('IP'),
|
||||
TextInput::make('uid')->required()->label('UID'),
|
||||
])
|
||||
->modalHeading(__('admin.resources.seed_box_record.check_modal_header'))
|
||||
->action(function (array $data) {
|
||||
@@ -38,7 +41,7 @@ class ListSeedBoxRecords extends PageList
|
||||
// }
|
||||
})
|
||||
->registerModalActions([
|
||||
Actions\Action::make('checkResult')
|
||||
Action::make('checkResult')
|
||||
->modalHeading(function () {
|
||||
if (self::$checkResult !== null) {
|
||||
if (self::$checkResult['result']) {
|
||||
|
||||
Reference in New Issue
Block a user