diff --git a/src/component/Admin/Index.js b/src/component/Admin/Index.js
index 91a328b..988c859 100644
--- a/src/component/Admin/Index.js
+++ b/src/component/Admin/Index.js
@@ -182,7 +182,12 @@ export default function Index() {
setNewsUsers(res);
})
.catch((error) => {
- ToggleSnackbar("top", "right", error.message, "error");
+ ToggleSnackbar(
+ "top",
+ "right",
+ "Cloudreve 公告加载失败",
+ "warning"
+ );
});
}, []);
diff --git a/src/component/Admin/Setting/Captcha.js b/src/component/Admin/Setting/Captcha.js
index 72212ae..abb39db 100644
--- a/src/component/Admin/Setting/Captcha.js
+++ b/src/component/Admin/Setting/Captcha.js
@@ -12,6 +12,8 @@ import MenuItem from "@material-ui/core/MenuItem";
import Input from "@material-ui/core/Input";
import Link from "@material-ui/core/Link";
import { toggleSnackbar } from "../../../redux/explorer";
+import FormControlLabel from "@material-ui/core/FormControlLabel";
+import Switch from "@material-ui/core/Switch";
const useStyles = makeStyles((theme) => ({
root: {
@@ -40,7 +42,14 @@ export default function Captcha() {
captcha_height: "1",
captcha_width: "1",
captcha_mode: "3",
- captcha_CaptchaLen: "",
+ captcha_CaptchaLen: "6",
+ captcha_ComplexOfNoiseText: "0",
+ captcha_ComplexOfNoiseDot: "0",
+ captcha_IsShowHollowLine: "0",
+ captcha_IsShowNoiseDot: "0",
+ captcha_IsShowNoiseText: "0",
+ captcha_IsShowSlimeLine: "0",
+ captcha_IsShowSineLine: "0",
captcha_ReCaptchaKey: "",
captcha_ReCaptchaSecret: "",
captcha_TCaptcha_CaptchaAppId: "",
@@ -100,6 +109,14 @@ export default function Captcha() {
});
};
+ const handleCheckChange = (name) => (event) => {
+ const value = event.target.checked ? "1" : "0";
+ setOptions({
+ ...options,
+ [name]: value,
+ });
+ };
+
return (
+
+
+
+ 长度
+
+
+
+
@@ -200,6 +236,55 @@ export default function Captcha() {
+ {[
+ {
+ name: "加强干扰文字",
+ field: "captcha_ComplexOfNoiseText",
+ },
+ {
+ name: "加强干扰点",
+ field: "captcha_ComplexOfNoiseDot",
+ },
+ {
+ name: "使用空心线",
+ field: "captcha_IsShowHollowLine",
+ },
+ {
+ name: "使用噪点",
+ field: "captcha_IsShowNoiseDot",
+ },
+ {
+ name: "使用干扰文字",
+ field: "captcha_IsShowNoiseText",
+ },
+ {
+ name: "使用波浪线",
+ field: "captcha_IsShowSlimeLine",
+ },
+ {
+ name: "使用正弦线",
+ field: "captcha_IsShowSineLine",
+ },
+ ].map((input) => (
+
+
+
+ }
+ label={input.name}
+ />
+
+
+ ))}
)}
diff --git a/src/component/Admin/Setting/Image.js b/src/component/Admin/Setting/Image.js
index 98dfbba..e6a81cc 100644
--- a/src/component/Admin/Setting/Image.js
+++ b/src/component/Admin/Setting/Image.js
@@ -10,6 +10,9 @@ import { useDispatch } from "react-redux";
import { toggleSnackbar } from "../../../redux/explorer";
import API from "../../../middleware/Api";
import SizeInput from "../Common/SizeInput";
+import Alert from "@material-ui/lab/Alert";
+import FormControlLabel from "@material-ui/core/FormControlLabel";
+import Switch from "@material-ui/core/Switch";
const useStyles = makeStyles((theme) => ({
root: {
@@ -43,6 +46,11 @@ export default function ImageSetting() {
thumb_width: "",
thumb_height: "",
office_preview_service: "",
+ thumb_file_suffix: "",
+ thumb_max_task_count: "",
+ thumb_encode_method: "",
+ thumb_gc_after_gen: "0",
+ thumb_encode_quality: "",
});
const handleChange = (name) => (event) => {
@@ -96,6 +104,14 @@ export default function ImageSetting() {
});
};
+ const handleCheckChange = (name) => (event) => {
+ const value = event.target.checked ? "1" : "0";
+ setOptions({
+ ...options,
+ [name]: value,
+ });
+ };
+
return (