coolify/resources/views/livewire/notifications/discord-settings.blade.php

40 lines
1.8 KiB
PHP
Raw Normal View History

2023-06-01 12:15:33 +02:00
<div>
2023-05-25 18:27:52 +02:00
<form wire:submit.prevent='submit' class="flex flex-col">
2023-06-01 12:15:33 +02:00
<div class="flex items-center gap-2">
2023-06-02 12:34:45 +02:00
<h2>Discord</h2>
<x-forms.button type="submit">
2023-06-01 12:15:33 +02:00
Save
</x-forms.button>
@if ($model->discord_enabled)
2023-06-09 15:55:21 +02:00
<x-forms.button class="text-white normal-case btn btn-xs no-animation btn-primary"
2023-08-11 20:19:42 +02:00
wire:click="sendTestNotification">
2023-06-09 15:55:21 +02:00
Send Test Notifications
</x-forms.button>
@endif
2023-06-01 12:15:33 +02:00
</div>
2023-06-19 14:31:42 +02:00
<div class="w-48">
2023-08-11 20:19:42 +02:00
<x-forms.checkbox instantSave id="model.discord_enabled" label="Notification Enabled" />
2023-05-25 18:27:52 +02:00
</div>
2023-07-28 12:51:26 +02:00
<x-forms.input type="password"
2023-08-11 20:19:42 +02:00
helper="Generate a webhook in Discord.<br>Example: https://discord.com/api/webhooks/...." required
id="model.discord_webhook_url" label="Webhook" />
2023-05-25 18:27:52 +02:00
</form>
@if (data_get($model, 'discord_enabled'))
2023-08-10 21:00:02 +02:00
<h3 class="mt-4">Subscribe to events</h3>
<div class="w-64">
@if (isDev())
2023-08-11 20:19:42 +02:00
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications_test" label="Test" />
2023-06-20 15:04:46 +02:00
@endif
2023-08-10 21:00:02 +02:00
<h4 class="mt-4">General</h4>
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications_status_changes"
2023-08-11 20:19:42 +02:00
label="Container Status Changes" />
2023-08-10 21:00:02 +02:00
<h4 class="mt-4">Applications</h4>
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications_deployments"
2023-08-11 20:19:42 +02:00
label="Deployments" />
2023-08-10 21:00:02 +02:00
<h4 class="mt-4">Databases</h4>
<x-forms.checkbox instantSave="saveModel" id="model.discord_notifications_database_backups"
2023-08-11 20:19:42 +02:00
label="Backup Statuses" />
2023-06-20 15:04:46 +02:00
</div>
@endif
2023-05-25 18:27:52 +02:00
</div>