refactor discord notification view
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@if ($team->discord_enabled)
|
||||
@if ($discordEnabled)
|
||||
<x-forms.button class="normal-case dark:text-white btn btn-xs no-animation btn-primary"
|
||||
wire:click="sendTestNotification">
|
||||
Send Test Notifications
|
||||
@@ -17,27 +17,26 @@
|
||||
@endif
|
||||
</div>
|
||||
<div class="w-32">
|
||||
<x-forms.checkbox instantSave id="team.discord_enabled" label="Enabled" />
|
||||
<x-forms.checkbox instantSave id="discordEnabled" label="Enabled" />
|
||||
</div>
|
||||
<x-forms.input type="password"
|
||||
helper="Generate a webhook in Discord.<br>Example: https://discord.com/api/webhooks/...." required
|
||||
id="team.discord_webhook_url" label="Webhook" />
|
||||
id="discordWebhookUrl" label="Webhook" />
|
||||
</form>
|
||||
@if (data_get($team, 'discord_enabled'))
|
||||
@if ($discordEnabled)
|
||||
<h2 class="mt-4">Subscribe to events</h2>
|
||||
<div class="w-64">
|
||||
@if (isDev())
|
||||
<x-forms.checkbox instantSave="saveModel" id="team.discord_notifications_test" label="Test" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="discordNotificationsTest" label="Test" />
|
||||
@endif
|
||||
<x-forms.checkbox instantSave="saveModel" id="team.discord_notifications_status_changes"
|
||||
<x-forms.checkbox instantSave="saveModel" id="discordNotificationsStatusChanges"
|
||||
label="Container Status Changes" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="team.discord_notifications_deployments"
|
||||
<x-forms.checkbox instantSave="saveModel" id="discordNotificationsDeployments"
|
||||
label="Application Deployments" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="team.discord_notifications_database_backups"
|
||||
label="Backup Status" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="team.discord_notifications_scheduled_tasks"
|
||||
<x-forms.checkbox instantSave="saveModel" id="discordNotificationsDatabaseBackups" label="Backup Status" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="discordNotificationsScheduledTasks"
|
||||
label="Scheduled Tasks Status" />
|
||||
<x-forms.checkbox instantSave="saveModel" id="team.discord_notifications_server_disk_usage"
|
||||
<x-forms.checkbox instantSave="saveModel" id="discordNotificationsServerDiskUsage"
|
||||
label="Server Disk Usage" />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user