mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
WIP notifications and other refactors (#88)
* WIP notifications and other refactors - refactor notification channels - send notifications on events related to the servers and sites - delete server log files on server deletion - add telegram notification channel - add new icons - cache configs and icons on installation and updates - new navbar for dark mode and settings * discord channel * build assets * pint
This commit is contained in:
@ -2,9 +2,17 @@
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
interface Notification
|
||||
{
|
||||
public function subject(): string;
|
||||
public function rawText(): string;
|
||||
|
||||
public function message(bool $mail = false): mixed;
|
||||
public function toMail(object $notifiable): MailMessage;
|
||||
|
||||
public function toSlack(object $notifiable): string;
|
||||
|
||||
public function toDiscord(object $notifiable): string;
|
||||
|
||||
public function toTelegram(object $notifiable): string;
|
||||
}
|
||||
|
@ -4,11 +4,13 @@
|
||||
|
||||
interface NotificationChannel
|
||||
{
|
||||
public function validationRules(): array;
|
||||
public function createRules(array $input): array;
|
||||
|
||||
public function data(array $input): array;
|
||||
public function createData(array $input): array;
|
||||
|
||||
public function data(): array;
|
||||
|
||||
public function connect(): bool;
|
||||
|
||||
public function sendMessage(string $subject, string $text): void;
|
||||
public function send(object $notifiable, Notification $notification): void;
|
||||
}
|
||||
|
Reference in New Issue
Block a user