Fix action in notifications (#1257)

This commit is contained in:
Boy132 2025-04-14 12:57:38 +02:00 committed by GitHub
parent 2a3781f5a8
commit f23d4d6971
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@
namespace App\Notifications;
use App\Filament\Server\Pages\Console;
use App\Models\Server;
use App\Models\User;
use Illuminate\Bus\Queueable;
@ -27,6 +28,6 @@ class AddedToServer extends Notification implements ShouldQueue
->greeting('Hello ' . $notifiable->username . '!')
->line('You have been added as a subuser for the following server, allowing you certain control over the server.')
->line('Server Name: ' . $this->server->name)
->action('Visit Server', url('/server/' . $this->server->uuid_short));
->action('Visit Server', Console::getUrl(panel: 'server', tenant: $this->server));
}
}

View File

@ -28,6 +28,6 @@ class RemovedFromServer extends Notification implements ShouldQueue
->greeting('Hello ' . $notifiable->username . '.')
->line('You have been removed as a subuser for the following server.')
->line('Server Name: ' . $this->server->name)
->action('Visit Panel', config('app.url'));
->action('Visit Panel', url(''));
}
}

View File

@ -2,10 +2,10 @@
namespace App\Notifications;
use App\Filament\Server\Pages\Console;
use App\Models\User;
use Illuminate\Bus\Queueable;
use App\Models\Server;
use App\Filament\App\Resources\ServerResource\Pages\ListServers;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
@ -28,6 +28,6 @@ class ServerInstalled extends Notification implements ShouldQueue
->greeting('Hello ' . $notifiable->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', ListServers::getUrl());
->action('Login and Begin Using', Console::getUrl(panel: 'server', tenant: $this->server));
}
}