fix: test email on for admins or custom smtp

This commit is contained in:
Andras Bacsai 2023-09-08 17:26:59 +02:00
parent 2e855e030f
commit f6c3fe7888
2 changed files with 20 additions and 21 deletions

View File

@ -21,7 +21,7 @@
Copy from Instance Settings
</x-forms.button>
@endif
@if (isEmailEnabled($team) || data_get($team, 'use_instance_email_settings'))
@if (isEmailEnabled($team) && auth()->user()->isAdminFromSession())
<x-forms.button onclick="sendTestEmail.showModal()"
class="text-white normal-case btn btn-xs no-animation btn-primary">
Send Test Email
@ -119,13 +119,11 @@
@endif
<h3 class="mt-4">Container Status Changes</h3>
<div class="flex items-end gap-10">
<x-forms.checkbox instantSave="saveModel" id="team.smtp_notifications_status_changes"
label="Enabled" />
<x-forms.checkbox instantSave="saveModel" id="team.smtp_notifications_status_changes" label="Enabled" />
</div>
<h3 class="mt-4">Application Deployments</h3>
<div class="flex items-end gap-10">
<x-forms.checkbox instantSave="saveModel" id="team.smtp_notifications_deployments"
label="Enabled" />
<x-forms.checkbox instantSave="saveModel" id="team.smtp_notifications_deployments" label="Enabled" />
</div>
<h3 class="mt-4">Backup Status</h3>
<div class="flex items-end gap-10">

View File

@ -22,7 +22,7 @@
<x-forms.button type="submit">
Save
</x-forms.button>
@if ($settings->resend_enabled || $settings->smtp_enabled)
@if (isEmailEnabled($settings))
<x-forms.button onclick="sendTestEmail.showModal()"
class="text-white normal-case btn btn-xs no-animation btn-primary">
Send Test Email
@ -74,7 +74,8 @@
<form wire:submit.prevent='submitResend' class="flex flex-col">
<div class="flex flex-col gap-4">
<div class="flex flex-col w-full gap-2 xl:flex-row">
<x-forms.input type="password" id="settings.resend_api_key" placeholder="API key" label="Host" />
<x-forms.input type="password" id="settings.resend_api_key" placeholder="API key"
label="Host" />
</div>
</div>
<div class="flex justify-end gap-4 pt-6">