chore: fix
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vocechat-web",
|
"name": "vocechat-web",
|
||||||
"version": "0.8.6",
|
"version": "0.8.7",
|
||||||
"homepage": "https://voce.chat",
|
"homepage": "https://voce.chat",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@metamask/onboarding": "^1.0.1",
|
"@metamask/onboarding": "^1.0.1",
|
||||||
|
|||||||
@@ -7,14 +7,11 @@ import toast from "react-hot-toast";
|
|||||||
import { shallowEqual } from "react-redux";
|
import { shallowEqual } from "react-redux";
|
||||||
import ServerVersionChecker from "@/components/ServerVersionChecker";
|
import ServerVersionChecker from "@/components/ServerVersionChecker";
|
||||||
import Toggle from "@/components/styled/Toggle";
|
import Toggle from "@/components/styled/Toggle";
|
||||||
import useConfig from "@/hooks/useConfig";
|
|
||||||
import { SMTPConfig } from "@/types/server";
|
|
||||||
import { useUpdateInfoMutation } from "@/app/services/user";
|
import { useUpdateInfoMutation } from "@/app/services/user";
|
||||||
|
|
||||||
type Props = {};
|
type Props = {};
|
||||||
const UserMsgEmailNotify = ({}: Props) => {
|
const UserMsgEmailNotify = ({}: Props) => {
|
||||||
const [updateInfo, { isSuccess }] = useUpdateInfoMutation();
|
const [updateInfo, { isSuccess }] = useUpdateInfoMutation();
|
||||||
const { values } = useConfig("smtp");
|
|
||||||
const { t } = useTranslation("setting");
|
const { t } = useTranslation("setting");
|
||||||
const { t: ct } = useTranslation();
|
const { t: ct } = useTranslation();
|
||||||
const { refetch } = useGetSystemCommonQuery();
|
const { refetch } = useGetSystemCommonQuery();
|
||||||
@@ -33,13 +30,6 @@ const UserMsgEmailNotify = ({}: Props) => {
|
|||||||
}
|
}
|
||||||
}, [isSuccess]);
|
}, [isSuccess]);
|
||||||
const toggleEnable = () => {
|
const toggleEnable = () => {
|
||||||
if (!msgNotify) {
|
|
||||||
// 检查下 SMTP 开关
|
|
||||||
if (!(values as SMTPConfig).enabled) {
|
|
||||||
toast.error("Enable SMTP first!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
updateInfo({ msg_smtp_notify_enable: !msgNotify });
|
updateInfo({ msg_smtp_notify_enable: !msgNotify });
|
||||||
};
|
};
|
||||||
if (!ServerMsgNotify) return null;
|
if (!ServerMsgNotify) return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user