Saeed Vaziry e997d0deea
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
2024-01-07 09:54:08 +01:00

39 lines
744 B
PHP

<?php
namespace App\Http\Livewire\NotificationChannels;
use Illuminate\Contracts\View\View;
use Livewire\Component;
class AddChannel extends Component
{
public string $provider = '';
public string $label;
public string $webhook_url;
public string $email;
public string $bot_token;
public string $chat_id;
public function add(): void
{
app(\App\Actions\NotificationChannels\AddChannel::class)->add(
auth()->user(),
$this->all()
);
$this->emitTo(ChannelsList::class, '$refresh');
$this->dispatchBrowserEvent('added', true);
}
public function render(): View
{
return view('livewire.notification-channels.add-channel');
}
}