diff --git a/components/account-panel.tsx b/components/account-panel.tsx index 6adcbac..468f570 100644 --- a/components/account-panel.tsx +++ b/components/account-panel.tsx @@ -7,7 +7,7 @@ import { PreviewNotice, StatusCard } from "@/components/ui"; const apiBase = process.env.NEXT_PUBLIC_API_BASE_URL ?? "/api/v1"; -type User = { email: string; role: "user" | "admin"; plan: "free" | "vip"; status: string; email_verified: boolean; phone_verified: boolean }; +type User = { email: string; username: string; role: "user" | "admin"; plan: "free" | "vip"; status: string; email_verified: boolean; phone_verified: boolean }; type Usage = { period_start: string; period_end: string; limit: number; adjustment: number; used: number; reserved: number; available: number; plan: string }; export function AccountPanel() { @@ -54,7 +54,7 @@ export function AccountPanel() { return <>
-

Profile

基本资料

邮箱
{user.email}
角色
{user.role}
{user.role === "admin" ?
后台
进入管理后台
: null}
额度周期
{new Date(usage.period_start).toLocaleDateString()} 至 {new Date(usage.period_end).toLocaleDateString()}
+

Profile

基本资料

用户名
{user.username}
邮箱
{user.email}
角色
{user.role}
{user.role === "admin" ? <>
业务后台
进入管理后台
内容管理
进入 CMS
: null}
额度周期
{new Date(usage.period_start).toLocaleDateString()} 至 {new Date(usage.period_end).toLocaleDateString()}

Usage

额度明细

打开工作台

Security

修改密码

{passwordMessage ?

{passwordMessage}

: null}
; diff --git a/components/admin/gate.tsx b/components/admin/gate.tsx index 8be419f..217b6bc 100644 --- a/components/admin/gate.tsx +++ b/components/admin/gate.tsx @@ -12,6 +12,7 @@ const nav = [ { href: "/admin", label: "概览" }, { href: "/admin/users", label: "用户" }, { href: "/admin/tts", label: "TTS 与审计" }, + { href: "/cms/admin", label: "CMS 内容管理" }, ]; export function AdminGate({ children }: { children: React.ReactNode }) {