upd: 调整邮件轮询时长

This commit is contained in:
oiov committed 2024-05-31 18:43:45 +08:00
1 parent fc05d005a7
commit 450bbbe20a
3 files changed
+21 -22

No files matched your search

+9 -5
View File
@@ -59,7 +59,7 @@ export function MailList(props: { mails: Email[] }) {
queryKey: ["mails"],
queryFn: fetchMails,
initialData: props.mails,
refetchInterval: 10000,
refetchInterval: 20000, // refetch every 20 seconds
});
return (
@@ -83,10 +83,14 @@ export function MailList(props: { mails: Email[] }) {
queryKey: ["mails"],
})
}>
{data.length === 0 && <Lock className="size-6" />}
{data.length > 0 && (
<Refresh className="size-6 animate-spin hover:opacity-50 transition-all duration-300" />
)}
<Refresh
className={
isFetching
? "animate-spin"
: "" +
" size-6 hover:animate-spin active:opacity-20 transition-all duration-300"
}
/>
</button>
</div>
+8 -13
View File
@@ -3,23 +3,18 @@ import { SVGProps } from "react";
export default function Refresh(props: SVGProps<SVGSVGElement>) {
return (
<svg
className={props.className}
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
{...props}>
<g fill="none" fill-rule="evenodd">
<path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" />
<path
fill="#ffffff"
d="M12 4.5a7.5 7.5 0 1 0 0 15a7.5 7.5 0 0 0 0-15M1.5 12C1.5 6.201 6.201 1.5 12 1.5S22.5 6.201 22.5 12S17.799 22.5 12 22.5S1.5 17.799 1.5 12"
opacity=".1"
/>
<path
fill="#ffffff"
d="M12 4.5a7.458 7.458 0 0 0-5.187 2.083a1.5 1.5 0 0 1-2.075-2.166A10.458 10.458 0 0 1 12 1.5a1.5 1.5 0 0 1 0 3"
/>
</g>
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round">
<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8" />
<path d="M21 3v5h-5" />
</svg>
);
}
+4 -4
View File
@@ -1,10 +1,10 @@
{
"Donate": "打赏",
"Virtual Temporary Email": "虚拟临时邮箱",
"Privacy friendly": "隐私友好",
"Valid for 1 Day": "有效期 1 天",
"AD friendly": "无内置广告",
"100% Run on Cloudflare": "运行在 Cloudflare",
"Privacy friendly": "免费创建无限邮箱",
"Valid for 1 Day": "有效期 1 天 (可密码找回)",
"AD friendly": "多域名后缀收发邮件",
"100% Run on Cloudflare": "稳定接收 20k+ 邮件",
"Email address": "电子邮件地址",
"Stop": "停止",
"Validater": "人机验证",