mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 22:14:45 +02:00
refactor: route redirect links
This commit is contained in:
parent
e4849d89d7
commit
17bb23b5b8
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Filament\App\Resources\ServerResource\Pages\ListServers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Auth\AuthManager;
|
||||
|
||||
@ -18,7 +19,7 @@ class RedirectIfAuthenticated
|
||||
public function handle(Request $request, \Closure $next, ?string $guard = null): mixed
|
||||
{
|
||||
if ($this->authManager->guard($guard)->check()) {
|
||||
return redirect()->route('filament.app.resources...index');
|
||||
return redirect(ListServers::getUrl());
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
@ -201,7 +201,7 @@ class Node extends Model
|
||||
],
|
||||
],
|
||||
'allowed_mounts' => $this->mounts->pluck('source')->toArray(),
|
||||
'remote' => route('filament.app.resources...index'),
|
||||
'remote' => config('app.url'),
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Events\Server\SubUserRemoved;
|
||||
use App\Filament\App\Resources\ServerResource\Pages\ListServers;
|
||||
use App\Models\Server;
|
||||
use App\Models\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@ -52,6 +53,6 @@ class RemovedFromServer extends Notification implements ShouldQueue
|
||||
->greeting('Hello ' . $this->user->username . '.')
|
||||
->line('You have been removed as a subuser for the following server.')
|
||||
->line('Server Name: ' . $this->server->name)
|
||||
->action('Visit Panel', route('filament.app.resources...index'));
|
||||
->action('Visit Panel', ListServers::getUrl());
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ use Illuminate\Bus\Queueable;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Container\Container;
|
||||
use App\Events\Server\Installed;
|
||||
use App\Filament\App\Resources\ServerResource\Pages\ListServers;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Contracts\Notifications\Dispatcher;
|
||||
@ -63,6 +64,6 @@ class ServerInstalled extends Notification implements ShouldQueue
|
||||
->greeting('Hello ' . $this->user->username . '.')
|
||||
->line('Your server has finished installing and is now ready for you to use.')
|
||||
->line('Server Name: ' . $this->server->name)
|
||||
->action('Login and Begin Using', route('filament.app.resources...index'));
|
||||
->action('Login and Begin Using', ListServers::getUrl());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user