diff --git a/src/app/chat/chat-screen.tsx b/src/app/chat/chat-screen.tsx index c2b13ec6..a85b2ef7 100644 --- a/src/app/chat/chat-screen.tsx +++ b/src/app/chat/chat-screen.tsx @@ -23,7 +23,6 @@ import { ChatQuotaExhaustedBanner, ExternalBrowserDialog, PwaInstallOverlay, - VoiceUnlockOptionsDialog, } from "./components"; import styles from "./components/chat-screen.module.css"; @@ -41,7 +40,6 @@ export function ChatScreen() { const router = useRouter(); const [showExternalBrowserDialog, setShowExternalBrowserDialog] = useState(false); - const [showVoiceUnlockDialog, setShowVoiceUnlockDialog] = useState(false); // isGuest 派生(chat-screen 是唯一知道这个值的地方 —— chat 机器无 isGuest 字段) const isGuest = deriveIsGuest(authState.loginStatus); @@ -62,20 +60,6 @@ export function ChatScreen() { returnTo: "chat", }); - function navigateToSubscription(type: "vip" | "voice"): void { - const subscriptionUrl = ROUTE_BUILDERS.subscription(type, { - returnTo: "chat", - }); - - setShowVoiceUnlockDialog(false); - if (isGuest) { - router.push(ROUTE_BUILDERS.authWithRedirect(subscriptionUrl)); - return; - } - - router.push(subscriptionUrl); - } - useEffect(() => { if (!authState.hasInitialized || authState.isLoading) return; const isDev = AppEnvUtil.isDevelopment(); @@ -170,7 +154,11 @@ export function ChatScreen() { } function handleUnlockVoiceMessage(): void { - setShowVoiceUnlockDialog(true); + if (isGuest) { + router.push(ROUTE_BUILDERS.authWithRedirect(chatPaywallSubscriptionUrl)); + return; + } + router.push(chatPaywallSubscriptionUrl); } return ( @@ -230,12 +218,6 @@ export function ChatScreen() { onClose={() => setShowExternalBrowserDialog(false)} onConfirm={() => void handleOpenExternalBrowser()} /> - setShowVoiceUnlockDialog(false)} - onBuyVoicePackage={() => navigateToSubscription("voice")} - onActivateVip={() => navigateToSubscription("vip")} - /> ); diff --git a/src/app/sidebar/sidebar-screen.tsx b/src/app/sidebar/sidebar-screen.tsx index 3efb25b5..890efbcb 100644 --- a/src/app/sidebar/sidebar-screen.tsx +++ b/src/app/sidebar/sidebar-screen.tsx @@ -13,14 +13,12 @@ import { UserHeader, type SidebarUserState, VipBenefitsCard, - VoicePackageCard, } from "./components"; import styles from "./components/sidebar-screen.module.css"; const FALLBACK_USERNAME = "User name"; const VIP_SUBSCRIPTION_URL = `${ROUTES.subscription}?type=vip`; -const VOICE_SUBSCRIPTION_URL = `${ROUTES.subscription}?type=voice`; /** * 侧边栏主屏幕 @@ -82,6 +80,7 @@ export function SidebarScreen() { /> + {/*
router.push(VOICE_SUBSCRIPTION_URL)} />
+ */} {sidebarState !== "guest" ? (