fix(chat): add voice unlock payment choices

This commit is contained in:
2026-06-25 14:41:21 +08:00
parent 5879b7acf3
commit ffc3db9a91
7 changed files with 201 additions and 2 deletions
+5
View File
@@ -29,6 +29,7 @@ export interface ChatAreaProps {
unlockingPrivateMessageId?: string | null;
onUnlockPrivateMessage?: (messageId: string) => void;
onUnlockImagePaywall?: () => void;
onUnlockVoiceMessage?: () => void;
}
export function ChatArea({
@@ -37,6 +38,7 @@ export function ChatArea({
unlockingPrivateMessageId,
onUnlockPrivateMessage,
onUnlockImagePaywall,
onUnlockVoiceMessage,
}: ChatAreaProps) {
const scrollRef = useRef<HTMLDivElement>(null);
const prevLengthRef = useRef(messages.length);
@@ -61,6 +63,7 @@ export function ChatArea({
unlockingPrivateMessageId,
onUnlockPrivateMessage,
onUnlockImagePaywall,
onUnlockVoiceMessage,
)}
{isReplyingAI && <LottieMessageBubble />}
@@ -74,6 +77,7 @@ function renderMessagesWithDateHeaders(
unlockingPrivateMessageId?: string | null,
onUnlockPrivateMessage?: (messageId: string) => void,
onUnlockImagePaywall?: () => void,
onUnlockVoiceMessage?: () => void,
) {
const items: Array<{ type: "date"; date: string; key: string } | { type: "msg"; message: UiMessage; key: string }> = [];
@@ -106,6 +110,7 @@ function renderMessagesWithDateHeaders(
}
onUnlockPrivateMessage={onUnlockPrivateMessage}
onUnlockImagePaywall={onUnlockImagePaywall}
onUnlockVoiceMessage={onUnlockVoiceMessage}
/>
),
);