refactor(chat): remove weekly limit flow
This commit is contained in:
@@ -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),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user