migration script

# Conflicts:
#	app/Filament/Resources/Torrent/AnnounceLogResource.php
This commit is contained in:
NekoCH
2025-09-21 18:07:38 +08:00
parent f0b50e4826
commit 532f3bdb3f
131 changed files with 2177 additions and 1644 deletions
@@ -2,6 +2,7 @@
namespace App\Filament\Resources\System\AgentAllowResource\Pages;
use Filament\Actions\DeleteAction;
use App\Filament\Resources\System\AgentAllowResource;
use App\Models\NexusModel;
use Filament\Pages\Actions;
@@ -14,7 +15,7 @@ class EditAgentAllow extends EditRecord
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make()->using(function ($record) {
DeleteAction::make()->using(function ($record) {
$record->delete();
clear_agent_allow_deny_cache();
return redirect(AgentAllowResource::getUrl());
@@ -2,6 +2,10 @@
namespace App\Filament\Resources\System\AgentAllowResource\Pages;
use Filament\Actions\CreateAction;
use Filament\Actions\Action;
use Filament\Forms\Components\TextInput;
use Exception;
use App\Filament\PageList;
use App\Filament\Resources\System\AgentAllowResource;
use App\Repositories\AgentAllowRepository;
@@ -16,12 +20,12 @@ class ListAgentAllows extends PageList
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Actions\Action::make('check')
CreateAction::make(),
Action::make('check')
->label(__('admin.resources.agent_allow.check_modal_btn'))
->form([
Forms\Components\TextInput::make('peer_id')->required(),
Forms\Components\TextInput::make('agent')->required(),
->schema([
TextInput::make('peer_id')->required(),
TextInput::make('agent')->required(),
])
->modalHeading(__('admin.resources.agent_allow.check_modal_header'))
->action(function ($data) {
@@ -29,7 +33,7 @@ class ListAgentAllows extends PageList
try {
$result = $agentAllowRep->checkClient($data['peer_id'], $data['agent']);
send_admin_success_notification(__('admin.resources.agent_allow.check_pass_msg', ['id' => $result->id]));
} catch (\Exception $exception) {
} catch (Exception $exception) {
send_admin_fail_notification($exception->getMessage());
}
})