Merge pull request #2504 from Sky-walkerX/refactor/email-settings-toggle

refactor(settings): moved email settings toggle buttons to end of line and renamed the wordings
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-06-23 08:43:38 +08:00
commit 230753320a
3 files changed
+33 -34

No files matched your search

+25 -27
View File
@@ -212,37 +212,35 @@ const SettingsEmail = ({
gap: theme.spacing(4), gap: theme.spacing(4),
}} }}
> >
<Typography>{t("settingsEmailSecure")}</Typography> {[
["settingsEmailSecure", "systemEmailSecure", systemEmailSecure],
["settingsEmailPool", "systemEmailPool", systemEmailPool],
["settingsEmailIgnoreTLS", "systemEmailIgnoreTLS", systemEmailIgnoreTLS],
["settingsEmailRequireTLS", "systemEmailRequireTLS", systemEmailRequireTLS],
[
"settingsEmailRejectUnauthorized",
"systemEmailRejectUnauthorized",
systemEmailRejectUnauthorized,
],
].map(([labelKey, name, value]) => (
<Box
key={name}
sx={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
}}
>
<Typography>{t(labelKey)}</Typography>
<Switch <Switch
name="systemEmailSecure" name={name}
checked={systemEmailSecure} checked={value}
onChange={handleChange}
/>
<Typography>{t("settingsEmailPool")}</Typography>
<Switch
name="systemEmailPool"
checked={systemEmailPool}
onChange={handleChange}
/>
<Typography>{t("settingsEmailIgnoreTLS")}</Typography>
<Switch
name="systemEmailIgnoreTLS"
checked={systemEmailIgnoreTLS}
onChange={handleChange}
/>
<Typography>{t("settingsEmailRequireTLS")}</Typography>
<Switch
name="systemEmailRequireTLS"
checked={systemEmailRequireTLS}
onChange={handleChange}
/>
<Typography>{t("settingsEmailRejectUnauthorized")}</Typography>
<Switch
name="systemEmailRejectUnauthorized"
checked={systemEmailRejectUnauthorized}
onChange={handleChange} onChange={handleChange}
/> />
</Box> </Box>
))}
</Box>
<Box> <Box>
{systemEmailHost && {systemEmailHost &&
systemEmailPort && systemEmailPort &&
+1 -1
View File
@@ -1033,7 +1033,7 @@ class NetworkService {
async flushQueue() { async flushQueue() {
return this.axiosInstance.post(`/queue/flush`); return this.axiosInstance.post(`/queue/flush`);
}
async exportMonitors() { async exportMonitors() {
const response = await this.axiosInstance.get("/monitors/export", { const response = await this.axiosInstance.get("/monitors/export", {
+7 -6
View File
@@ -749,11 +749,11 @@
}, },
"advancedMatching": "Advanced matching", "advancedMatching": "Advanced matching",
"settingsEmailTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP", "settingsEmailTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP",
"settingsEmailIgnoreTLS": "Ignore TLS - Disable STARTTLS", "settingsEmailIgnoreTLS": "Disable STARTTLS: Don't use TLS even if the server supports it",
"settingsEmailRequireTLS": "Require TLS - Force STARTTLS", "settingsEmailRequireTLS": "Force STARTTLS: Require TLS upgrade, fail if not supported",
"settingsEmailRejectUnauthorized": "Reject Unauthorized", "settingsEmailRejectUnauthorized": "Reject invalid certificates: Reject connections with self-signed or untrusted certificates",
"settingsEmailSecure": "Secure - Use SSL", "settingsEmailSecure": "Use SSL (recommended): Encrypt the connection using SSL/TLS",
"settingsEmailPool": "Pool - Enable connection pooling", "settingsEmailPool": "Enable connection pooling: Reuse existing connections to improve performance",
"sendTestNotifications": "Send test notifications", "sendTestNotifications": "Send test notifications",
"selectAll": "Select all", "selectAll": "Select all",
"queuePage": { "queuePage": {
@@ -785,7 +785,7 @@
"failCountHeader": "Fail count", "failCountHeader": "Fail count",
"failedAtHeader": "Last failed at", "failedAtHeader": "Last failed at",
"failReasonHeader": "Fail reason" "failReasonHeader": "Fail reason"
} },
"export": { "export": {
"title": "Export Monitors", "title": "Export Monitors",
"success": "Monitors exported successfully!", "success": "Monitors exported successfully!",
@@ -796,4 +796,5 @@
"import": "Import Monitors", "import": "Import Monitors",
"export": "Export Monitors" "export": "Export Monitors"
} }
}
} }