This commit is contained in:
Andras Bacsai
2023-06-20 15:04:46 +02:00
parent 8910d5a65d
commit de759290e5
15 changed files with 62 additions and 52 deletions

View File

@@ -5,7 +5,7 @@
<x-forms.button type="submit">
Save
</x-forms.button>
@if ($model->extra_attributes->discord_active)
@if ($model->extra_attributes->discord_enabled)
<x-forms.button class="text-white normal-case btn btn-xs no-animation btn-primary"
wire:click="sendTestNotification">
Send Test Notifications
@@ -13,19 +13,21 @@
@endif
</div>
<div class="w-48">
<x-forms.checkbox instantSave id="model.extra_attributes.discord_active" label="Notification Enabled" />
<x-forms.checkbox instantSave id="model.extra_attributes.discord_enabled" label="Notification Enabled" />
</div>
<x-forms.input type="string"
helper="Generate a webhook in Discord.<br>Example: https://discord.com/api/webhooks/...." required
id="model.extra_attributes.discord_webhook" label="Webhook" />
id="model.extra_attributes.discord_webhook_url" label="Webhook" />
</form>
<h4 class="mt-4">Subscribe to events</h4>
<div class="w-64 ">
@if (isDev())
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_discord_test"
label="Test Notifications" />
@endif
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_discord_deployments"
label="New Deployments" />
</div>
@if (data_get($model, 'extra_attributes.discord_enabled'))
<h4 class="mt-4">Subscribe to events</h4>
<div class="w-64 ">
@if (isDev())
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_discord_test"
label="Test Notifications" />
@endif
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_discord_deployments"
label="New Deployments" />
</div>
@endif
</div>

View File

@@ -10,7 +10,7 @@
Copy from Instance Settings
</x-forms.button>
@endif
@if ($model->extra_attributes->smtp_active)
@if ($model->extra_attributes->smtp_enabled)
<x-forms.button class="text-white normal-case btn btn-xs no-animation btn-primary"
wire:click="sendTestNotification">
Send Test Notifications
@@ -18,7 +18,7 @@
@endif
</div>
<div class="w-48">
<x-forms.checkbox instantSave id="model.extra_attributes.smtp_active" label="Notification Enabled" />
<x-forms.checkbox instantSave id="model.extra_attributes.smtp_enabled" label="Notification Enabled" />
</div>
<div class="flex flex-col gap-2 xl:flex-row">
@@ -53,13 +53,15 @@
</div>
</div>
</form>
<h4 class="mt-4">Subscribe to events</h4>
<div class="w-64 ">
@if (isDev())
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_email_test"
label="Test Notifications" />
@endif
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_email_deployments"
label="New Deployments" />
</div>
@if (data_get($model, 'extra_attributes.smtp_enabled'))
<h4 class="mt-4">Subscribe to events</h4>
<div class="w-64 ">
@if (isDev())
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_smtp_test"
label="Test Notifications" />
@endif
<x-forms.checkbox instantSave="saveModel" id="model.extra_attributes.notifications_email_deployments"
label="New Deployments" />
</div>
@endif
</div>

View File

@@ -8,12 +8,12 @@
</div>
<div class="pt-2 pb-4 ">SMTP settings for password resets, invitations, etc.</div>
<div class="flex flex-col">
<x-forms.checkbox instantSave id="settings.extra_attributes.smtp_active" label="Enabled" />
<x-forms.checkbox instantSave id="settings.extra_attributes.smtp_enabled" label="Enabled" />
</div>
<div class="flex items-end gap-2">
<x-forms.input id="settings.extra_attributes.smtp_test_recipients" label="Test Recipients"
helper="Email list to send a test email to, separated by comma." />
@if ($settings->extra_attributes->smtp_active)
@if ($settings->extra_attributes->smtp_enabled)
<x-forms.button wire:click='test_email'>
Send Test Email
</x-forms.button>