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
2025-06-23 08:43:38 +08:00
committed by GitHub
3 changed files with 45 additions and 46 deletions

View File

@@ -212,37 +212,35 @@ const SettingsEmail = ({
gap: theme.spacing(4),
}}
>
<Typography>{t("settingsEmailSecure")}</Typography>
<Switch
name="systemEmailSecure"
checked={systemEmailSecure}
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}
/>
{[
["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
name={name}
checked={value}
onChange={handleChange}
/>
</Box>
))}
</Box>
<Box>
{systemEmailHost &&
systemEmailPort &&

View File

@@ -1033,8 +1033,8 @@ class NetworkService {
async flushQueue() {
return this.axiosInstance.post(`/queue/flush`);
}
async exportMonitors() {
const response = await this.axiosInstance.get("/monitors/export", {
responseType: "blob",

View File

@@ -749,11 +749,11 @@
},
"advancedMatching": "Advanced matching",
"settingsEmailTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP",
"settingsEmailIgnoreTLS": "Ignore TLS - Disable STARTTLS",
"settingsEmailRequireTLS": "Require TLS - Force STARTTLS",
"settingsEmailRejectUnauthorized": "Reject Unauthorized",
"settingsEmailSecure": "Secure - Use SSL",
"settingsEmailPool": "Pool - Enable connection pooling",
"settingsEmailIgnoreTLS": "Disable STARTTLS: Don't use TLS even if the server supports it",
"settingsEmailRequireTLS": "Force STARTTLS: Require TLS upgrade, fail if not supported",
"settingsEmailRejectUnauthorized": "Reject invalid certificates: Reject connections with self-signed or untrusted certificates",
"settingsEmailSecure": "Use SSL (recommended): Encrypt the connection using SSL/TLS",
"settingsEmailPool": "Enable connection pooling: Reuse existing connections to improve performance",
"sendTestNotifications": "Send test notifications",
"selectAll": "Select all",
"queuePage": {
@@ -785,15 +785,16 @@
"failCountHeader": "Fail count",
"failedAtHeader": "Last failed at",
"failReasonHeader": "Fail reason"
},
"export": {
"title": "Export Monitors",
"success": "Monitors exported successfully!",
"failed": "Failed to export monitors"
},
"monitorActions": {
"title": "Export/Import",
"import": "Import Monitors",
"export": "Export Monitors"
}
"export": {
"title": "Export Monitors",
"success": "Monitors exported successfully!",
"failed": "Failed to export monitors"
},
"monitorActions": {
"title": "Export/Import",
"import": "Import Monitors",
"export": "Export Monitors"
}
}