Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: Change email TLS/STARTTLS to mutually exclusive dropdown

rcourtmanac1cc1e0a937
diff --git a/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx b/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx
index 6a044323d1..547b94203d 100644
--- a/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx
+++ b/frontend-modern/src/components/Alerts/EmailProviderSelect.tsx
@@ -1,13 +1,7 @@
import { createSignal, createEffect, Show, For } from 'solid-js';
import { NotificationsAPI } from '@/api/notifications';
import { logger } from '@/utils/logger';
-import {
- formField,
- labelClass,
- controlClass,
- formHelpText,
- formCheckbox,
-} from '@/components/shared/Form';
+import { formField, labelClass, controlClass, formHelpText } from '@/components/shared/Form';
interface EmailProvider {
name: string;
@@ -249,28 +243,25 @@ export function EmailProviderSelect(props: EmailProviderSelectProps) {
<Show when={showAdvanced()}>
<div class="mt-3 space-y-3 text-xs text-gray-700 dark:text-gray-300">
<div class="grid gap-3 sm:grid-cols-3">
- <label class="flex items-center gap-2">
- <input
- type="checkbox"
- checked={props.config.tls}
- onChange={(e) =>
- props.onChange({ ...props.config, tls: e.currentTarget.checked })
- }
- class={`${formCheckbox} h-4 w-4`}
- />
- <span>Use TLS</span>
- </label>
- <label class="flex items-center gap-2">
- <input
- type="checkbox"
- checked={props.config.startTLS}
- onChange={(e) =>
- props.onChange({ ...props.config, startTLS: e.currentTarget.checked })
- }
- class={`${formCheckbox} h-4 w-4`}
- />
- <span>Use STARTTLS</span>
- </label>
+ <div class="flex items-center gap-2">
+ <label class={labelClass('text-xs uppercase tracking-[0.08em]')}>Security</label>
+ <select
+ value={props.config.tls ? 'tls' : props.config.startTLS ? 'starttls' : 'none'}
+ onChange={(e) => {
+ const value = e.currentTarget.value;
+ props.onChange({
+ ...props.config,
+ tls: value === 'tls',
+ startTLS: value === 'starttls',
+ });
+ }}
+ class={`${controlClass('px-2 py-1 text-sm')} min-w-[120px]`}
+ >
+ <option value="none">None</option>
+ <option value="starttls">STARTTLS (587)</option>
+ <option value="tls">TLS/SSL (465)</option>
+ </select>
+ </div>
<div class="flex w-full flex-wrap items-center gap-2 sm:flex-nowrap">
<label class={labelClass('text-xs uppercase tracking-[0.08em]')}>Rate limit</label>
<input