From 0e8e26e4dee4100dcff1089f83fc34fe165de65a Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Mon, 11 May 2020 09:28:03 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=E5=8F=B3=E9=94=AE=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=98=9F=E5=88=97SSL=E9=80=89=E9=A1=B9=20Modify:=20=E5=AE=8C?= =?UTF-8?q?=E5=96=84=20reCaptcha=20=E8=AF=B4=E6=98=8E=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Admin/Setting/Access.js | 33 +++++++++++++++++++------ src/component/Admin/Setting/Mail.js | 35 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/src/component/Admin/Setting/Access.js b/src/component/Admin/Setting/Access.js index cf88df3..bebfa68 100644 --- a/src/component/Admin/Setting/Access.js +++ b/src/component/Admin/Setting/Access.js @@ -14,6 +14,7 @@ import { useDispatch } from "react-redux"; import { toggleSnackbar } from "../../../actions"; import API from "../../../middleware/Api"; import AlertDialog from "../Dialogs/Alert"; +import Link from "@material-ui/core/Link"; const useStyles = makeStyles(theme => ({ root: { @@ -47,7 +48,7 @@ export default function Access() { authn_enabled: "0", captcha_IsUseReCaptcha: "0", captcha_ReCaptchaKey: "defaultKey", - captcha_ReCaptchaSecret: "defaultSecret", + captcha_ReCaptchaSecret: "defaultSecret" }); const [siteURL, setSiteURL] = useState(""); const [groups, setGroups] = useState([]); @@ -253,17 +254,18 @@ export default function Access() { control={ } - label="使用ReCaptcha验证码" + label="使用 reCaptcha V2 验证码" /> - 是否使用ReCaptcha验证码 + 是否使用 reCaptcha V2 验证码 @@ -283,7 +285,15 @@ export default function Access() { )} /> - 应用管理页面获取到的的 网站密钥 + + 应用管理页面 + {" "} + 获取到的的 网站密钥 @@ -295,13 +305,22 @@ export default function Access() { - 应用管理页面获取到的的 秘钥 + + 应用管理页面 + {" "}获取到的的 秘钥 diff --git a/src/component/Admin/Setting/Mail.js b/src/component/Admin/Setting/Mail.js index 94f51c9..c26de5d 100644 --- a/src/component/Admin/Setting/Mail.js +++ b/src/component/Admin/Setting/Mail.js @@ -15,6 +15,8 @@ import React, { useCallback, useEffect, useState } from "react"; import { useDispatch } from "react-redux"; import { toggleSnackbar } from "../../../actions"; import API from "../../../middleware/Api"; +import FormControlLabel from "@material-ui/core/FormControlLabel"; +import Switch from "@material-ui/core/Switch"; const useStyles = makeStyles(theme => ({ root: { @@ -51,6 +53,7 @@ export default function Mail() { replyTo: "", smtpUser: "", smtpPass: "", + smtpEncryption:"", mail_keepalive: "30", mail_activation_template: "", mail_reset_pwd_template: "" @@ -63,6 +66,17 @@ export default function Mail() { }); }; + const handleCheckChange = name => event => { + let value = event.target.value; + if (event.target.checked !== undefined) { + value = event.target.checked ? "1" : "0"; + } + setOptions({ + ...options, + [name]: value + }); + }; + const dispatch = useDispatch(); const ToggleSnackbar = useCallback( (vertical, horizontal, msg, color) => @@ -299,6 +313,27 @@ export default function Mail() { +
+ + + } + label="使用加密连接" + /> + + 是否使用SSL加密连接 + + +
+