请求邮箱验证,改为py接口

This commit is contained in:
海龙 2025-08-31 01:52:50 +08:00
parent 7454eb8b3d
commit 64bd73db29
2 changed files with 29 additions and 5 deletions

View File

@ -30,8 +30,7 @@ function ConfirmEmail({ t }: { t: string }) {
setMessage('Invalid verification token');
return;
}
post(`${process.env.NEXT_PUBLIC_JAVA_URL}/api/user/activate?t=${t}`)
post(`/auth/activate?t=${t}`)
.then((res) => {
setStatus('success');
setMessage('Your registration has been verified. Please return to the official website to log in.');

View File

@ -812,6 +812,24 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
videoDuration: "1min",
});
// 从 localStorage 初始化配置
useEffect(() => {
const savedConfig = localStorage.getItem('videoFlowConfig');
if (savedConfig) {
try {
const parsed = JSON.parse(savedConfig);
setConfigOptions({
mode: parsed.mode || "auto",
resolution: parsed.resolution || "720p",
language: parsed.language || "english",
videoDuration: parsed.videoDuration || "1min",
});
} catch (error) {
console.warn('解析保存的配置失败,使用默认配置:', error);
}
}
}, []);
// 配置项显示控制状态
const [showConfigOptions, setShowConfigOptions] = useState(false);
@ -918,9 +936,16 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
<div className="bg-white/[0.08] border border-white/[0.12] rounded-lg shadow-[0_8px_32px_rgba(0,0,0,0.3)]">
<ConfigOptions
config={configOptions}
onConfigChange={(key, value) =>
setConfigOptions((prev) => ({ ...prev, [key]: value }))
}
onConfigChange={(key, value) => {
setConfigOptions((prev) => {
const newConfig = { ...prev, [key]: value };
// 保存到 localStorage
if (typeof window !== 'undefined') {
localStorage.setItem('videoFlowConfig', JSON.stringify(newConfig));
}
return newConfig;
});
}}
/>
</div>
)}