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