docs: 新增 AI 代理学习偏好与信用盘术语规范
feat: 优化登录与入口页面加载体验 - 为登录页面添加 Suspense 边界,统一 fallback 样式 - 重构入口守卫逻辑,在布局阶段处理未登录重定向,避免闪烁 - 登录页面支持会话过期提示,并自动清理 URL 参数 feat: 信用盘与钱包盘文案差异化展示 - 底部导航「钱包」标签在信用盘模式下显示为「信用」 - 大厅余额条在信用盘模式下使用「可
This commit is contained in:
@@ -7,7 +7,9 @@ import { BarChart3, ClipboardList, Home, Wallet } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { playerViewportFixedBarClass } from "@/lib/player-viewport";
|
||||
import { isCreditFundingPlayer } from "@/lib/player-funding-mode";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { usePlayerSessionStore } from "@/stores/player-session-store";
|
||||
|
||||
const tabs = [
|
||||
{
|
||||
@@ -34,7 +36,9 @@ const tabs = [
|
||||
{
|
||||
href: "/wallet",
|
||||
labelKey: "nav.wallet",
|
||||
creditLabelKey: "nav.credit",
|
||||
labelDefault: "钱包",
|
||||
creditLabelDefault: "信用",
|
||||
icon: Wallet,
|
||||
match: (p: string) => p === "/wallet" || p.startsWith("/wallet/"),
|
||||
},
|
||||
@@ -46,6 +50,7 @@ const tabs = [
|
||||
export function PlayerBottomNav() {
|
||||
const pathname = usePathname() ?? "";
|
||||
const { t } = useTranslation("player");
|
||||
const creditMode = isCreditFundingPlayer(usePlayerSessionStore((state) => state.profile));
|
||||
|
||||
return (
|
||||
<nav
|
||||
@@ -56,9 +61,13 @@ export function PlayerBottomNav() {
|
||||
aria-label={t("nav.aria")}
|
||||
>
|
||||
<div className="grid h-14 w-full grid-cols-4 grid-rows-1">
|
||||
{tabs.map(({ href, labelKey, labelDefault, icon: Icon, match }) => {
|
||||
{tabs.map(({ href, labelKey, labelDefault, icon: Icon, match, ...tab }) => {
|
||||
const active = match(pathname);
|
||||
const label = t(labelKey, { defaultValue: labelDefault });
|
||||
const creditLabelKey = "creditLabelKey" in tab ? tab.creditLabelKey : undefined;
|
||||
const creditLabelDefault = "creditLabelDefault" in tab ? tab.creditLabelDefault : undefined;
|
||||
const label = creditMode && creditLabelKey
|
||||
? t(creditLabelKey, { defaultValue: creditLabelDefault ?? labelDefault })
|
||||
: t(labelKey, { defaultValue: labelDefault });
|
||||
return (
|
||||
<Link
|
||||
key={href}
|
||||
|
||||
Reference in New Issue
Block a user