Skip to content

Commit

Permalink
chore: remove sender codes (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
oiov committed Jul 1, 2024
1 parent 903d6e9 commit e9cd97f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 37 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<h1>𝐕𝐌𝐀𝐈𝐋.𝐃𝐄𝐕</h1>
<p><a href="https://discord.gg/d68kWCBDEs">Discord</a> · <a href="https://github.com/oiov/vmail/blob/main/README_en.md">English</a> | 简体中文</p>
<p>使用 Cloudflare email worker 实现的临时电子邮件服务</p>
<a href="https://trendshift.io/repositories/8681" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8681" alt="yesmore%2Fvmail | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<!-- <img src="https://img.inke.app/file/beb0212f96c6cd37eaeb8.jpg"/> -->
</div>

Expand Down
68 changes: 34 additions & 34 deletions apps/remix/app/routes/_h._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Clock from "~/components/icons/Clock";
import Info from "~/components/icons/Info";

import { useTranslation } from "react-i18next";
import { useSenderModal } from "~/components/sender";
// import { useSenderModal } from "~/components/sender";
import { getRandomCharacter } from "lib/hooks/utlis";

import { Toaster } from "react-hot-toast";
Expand Down Expand Up @@ -91,33 +91,33 @@ export const action: ActionFunction = async ({ request }) => {
});
}
} else if (_action === "create") {
if (siteKey) {
const response = formData.get("cf-turnstile-response");
if (!response) {
return {
error: "No captcha response",
};
}
const verifyEndpoint =
"https://challenges.cloudflare.com/turnstile/v0/siteverify";
const secret = process.env.TURNSTILE_SECRET || "";
const resp = await fetch(verifyEndpoint, {
method: "POST",
body: JSON.stringify({
secret,
response,
}),
headers: {
"Content-Type": "application/json",
},
});
const data = await resp.json();
if (!data.success) {
return {
error: "Failed to verify captcha",
};
}
}
// if (siteKey) {
// const response = formData.get("cf-turnstile-response");
// if (!response) {
// return {
// error: "No captcha response",
// };
// }
// const verifyEndpoint =
// "https://challenges.cloudflare.com/turnstile/v0/siteverify";
// const secret = process.env.TURNSTILE_SECRET || "";
// const resp = await fetch(verifyEndpoint, {
// method: "POST",
// body: JSON.stringify({
// secret,
// response,
// }),
// headers: {
// "Content-Type": "application/json",
// },
// });
// const data = await resp.json();
// if (!data.success) {
// return {
// error: "Failed to verify captcha",
// };
// }
// }

const domains = (process.env.EMAIL_DOMAIN || "").split(",");
if (domains.length === 0) {
Expand Down Expand Up @@ -215,9 +215,9 @@ export default function Index() {

const { t } = useTranslation();

const { SenderModal, setShowSenderModal } = useSenderModal(
loaderData.userMailbox
);
// const { SenderModal, setShowSenderModal } = useSenderModal(
// loaderData.userMailbox
// );

const { PasswordModal, setShowPasswordModal } = usePasswordModal(
loaderData.mails[0]?.id
Expand Down Expand Up @@ -276,14 +276,14 @@ export default function Index() {
{t("Stop")}
</button>

<div className="text-sm text-gray-300 mt-4">
{/* <div className="text-sm text-gray-300 mt-4">
{t("Vmail sender is beta now. ")}
<span
onClick={() => setShowSenderModal(true)}
className="text-cyan-500 cursor-pointer">
{t("Try it")}.
</span>
</div>
</div> */}
</Form>
)}

Expand Down Expand Up @@ -348,7 +348,7 @@ export default function Index() {
<div className="w-full flex-1 overflow-hidden">
<MailListWithQuery mails={loaderData.mails} />
</div>
<SenderModal />
{/* <SenderModal /> */}
<PasswordModal />
<Toaster />
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/remix/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"Donate": "打赏",
"Virtual Temporary Email": "虚拟临时邮箱",
"Privacy friendly": "免费创建无限邮箱",
"Valid for 1 Day": "有效期 1 天 (可密码找回)",
"AD friendly": "多域名后缀收发邮件",
"100% Run on Cloudflare": "稳定接收 20k+ 邮件",
"Valid for 1 Day": "有效期 1 天",
"AD friendly": "支持多域名后缀",
"100% Run on Cloudflare": "稳定接收 20000 封邮件 ",
"Email address": "电子邮件地址",
"Stop": "停止",
"Validater": "人机验证",
Expand Down

0 comments on commit e9cd97f

Please sign in to comment.