feat(chat): migrate chat protocol to lock detail
This commit is contained in:
@@ -45,19 +45,15 @@ export function ChatScreen() {
|
||||
// isGuest 派生(chat-screen 是唯一知道这个值的地方 —— chat 机器无 isGuest 字段)
|
||||
const isGuest = deriveIsGuest(authState.loginStatus);
|
||||
|
||||
// 消息数量限制由后端统一返回 blocked,前端不再处理本地额度。
|
||||
// 消息数量限制由后端统一返回 lockDetail,前端不再处理本地额度。
|
||||
const showMessageLimitBanner =
|
||||
state.paywallTriggered &&
|
||||
(state.paywallReason === "daily_limit" ||
|
||||
state.paywallReason === "total_limit");
|
||||
state.upgradePromptVisible && state.upgradeReason === "daily_limit";
|
||||
const messageLimitTitle =
|
||||
state.paywallReason === "total_limit"
|
||||
? "The limit for free chat times\nhas been reached"
|
||||
: undefined;
|
||||
state.upgradeHint ?? "The limit for free chat times\nhas been reached";
|
||||
const messageLimitCta = isGuest ? "Log in to continue chatting" : undefined;
|
||||
|
||||
const showPrivatePaywallBanner =
|
||||
state.paywallTriggered && state.paywallReason === "private_paywall";
|
||||
state.upgradePromptVisible && state.upgradeReason === "private_message";
|
||||
|
||||
const inlineUpgradeTitle = "Unlock VIP to view private messages";
|
||||
const inlineUpgradeCta = "Activate VIP to view private messages";
|
||||
|
||||
Reference in New Issue
Block a user