重构认证系统,从next-auth迁移至better-auth,并实现完整的积分系统功能: 1. 新增积分账户管理、交易记录和扣减逻辑 2. 添加积分概览组件和API端点 3. 重构认证相关组件和路由 4. 优化播客生成流程与积分校验 5. 新增安全配置文档和数据库schema 6. 改进UI状态管理和错误处理 新增功能包括: - 用户注册自动初始化积分账户 - 播客生成前检查积分余额 - 积分交易记录查询 - 用户积分实时显示 - 安全回调处理
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
import type { Metadata } from 'next';
|
||
import { Inter } from 'next/font/google';
|
||
import './globals.css';
|
||
|
||
const inter = Inter({
|
||
subsets: ['latin'],
|
||
display: 'swap',
|
||
variable: '--font-inter',
|
||
});
|
||
|
||
export const metadata: Metadata = {
|
||
title: 'PodcastHub - 把你的创意转为播客',
|
||
description: '使用AI技术将您的想法和内容转换为高质量的播客音频,支持多种语音和风格选择。',
|
||
keywords: ['播客', 'AI', '语音合成', 'TTS', '音频生成'],
|
||
authors: [{ name: 'PodcastHub Team' }],
|
||
viewport: 'width=device-width, initial-scale=1',
|
||
themeColor: '#000000',
|
||
icons: {
|
||
icon: '/favicon.ico',
|
||
apple: '/apple-touch-icon.png',
|
||
},
|
||
openGraph: {
|
||
title: 'PodcastHub - 把你的创意转为播客',
|
||
description: '使用AI技术将您的想法和内容转换为高质量的播客音频',
|
||
type: 'website',
|
||
locale: 'zh_CN',
|
||
},
|
||
};
|
||
|
||
export default function RootLayout({
|
||
children,
|
||
}: {
|
||
children: React.ReactNode;
|
||
}) {
|
||
return (
|
||
<html lang="zh-CN" className={inter.variable}>
|
||
<head>
|
||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
||
</head>
|
||
<body className={`${inter.className} antialiased`}>
|
||
<div id="root" className="min-h-screen bg-white">
|
||
{children}
|
||
</div>
|
||
{/* Toast容器 */}
|
||
<div id="toast-root" />
|
||
{/* Modal容器 */}
|
||
<div id="modal-root" />
|
||
</body>
|
||
</html>
|
||
);
|
||
} |