refactor(settings): email settings toggle in one row

This commit is contained in:
Sky-walkerX committed 2025-06-22 17:17:26 +05:30
1 parent c98b901902
commit f853a03491
1 file changed
+28 -30
+28 -30
View File
@@ -212,37 +212,35 @@ const SettingsEmail = ({
gap: theme.spacing(4), gap: theme.spacing(4),
}} }}
> >
<Typography>{t("settingsEmailSecure")}</Typography> {[
<Switch ["settingsEmailSecure", "systemEmailSecure", systemEmailSecure],
name="systemEmailSecure" ["settingsEmailPool", "systemEmailPool", systemEmailPool],
checked={systemEmailSecure} ["settingsEmailIgnoreTLS", "systemEmailIgnoreTLS", systemEmailIgnoreTLS],
onChange={handleChange} ["settingsEmailRequireTLS", "systemEmailRequireTLS", systemEmailRequireTLS],
/> [
<Typography>{t("settingsEmailPool")}</Typography> "settingsEmailRejectUnauthorized",
<Switch "systemEmailRejectUnauthorized",
name="systemEmailPool" systemEmailRejectUnauthorized,
checked={systemEmailPool} ],
onChange={handleChange} ].map(([labelKey, name, value]) => (
/> <Box
<Typography>{t("settingsEmailIgnoreTLS")}</Typography> key={name}
<Switch sx={{
name="systemEmailIgnoreTLS" display: "flex",
checked={systemEmailIgnoreTLS} alignItems: "center",
onChange={handleChange} justifyContent: "space-between",
/> }}
<Typography>{t("settingsEmailRequireTLS")}</Typography> >
<Switch <Typography>{t(labelKey)}</Typography>
name="systemEmailRequireTLS" <Switch
checked={systemEmailRequireTLS} name={name}
onChange={handleChange} checked={value}
/> onChange={handleChange}
<Typography>{t("settingsEmailRejectUnauthorized")}</Typography> />
<Switch </Box>
name="systemEmailRejectUnauthorized" ))}
checked={systemEmailRejectUnauthorized}
onChange={handleChange}
/>
</Box> </Box>
<Box> <Box>
{systemEmailHost && {systemEmailHost &&
systemEmailPort && systemEmailPort &&