refactor(chat): remove weekly limit flow

This commit is contained in:
2026-07-01 13:12:14 +08:00
parent d1ccf3631e
commit f6e7adbe96
9 changed files with 33 additions and 89 deletions
+5 -16
View File
@@ -58,19 +58,13 @@ export function ChatScreen() {
authState.loginStatus !== "notLoggedIn" &&
authState.loginStatus !== "guest";
// 消息数量限制由后端统一返回 lockDetail,前端不再处理本地额度
// 发送能力由后端统一返回,当前只处理积分不足引导
const showMessageLimitBanner =
state.upgradePromptVisible &&
(state.upgradeReason === "weekly_limit" ||
state.upgradeReason === "insufficient_credits");
state.upgradeReason === "insufficient_credits";
const messageLimitTitle =
state.upgradeReason === "insufficient_credits"
? "Insufficient credits\nTop up to continue chatting"
: "The limit for free chat times\nhas been reached";
const messageLimitCtaLabel =
state.upgradeReason === "insufficient_credits"
? "Top up credits to continue"
: "Unlock your membership to continue";
"Insufficient credits\nTop up to continue chatting";
const messageLimitCtaLabel = "Top up credits to continue";
const externalBrowserPromptShownRef = useRef(false);
@@ -188,15 +182,10 @@ export function ChatScreen() {
}
function handleMessageLimitUnlock(): void {
const subscriptionType =
state.upgradeReason === "insufficient_credits"
? getInsufficientCreditsSubscriptionType(userState.isVip)
: "vip";
router.push(
getChatPaywallNavigationUrl(
authState.loginStatus,
subscriptionType,
getInsufficientCreditsSubscriptionType(userState.isVip),
),
);
}