chore: update message bubble

This commit is contained in:
Muhsin
2026-06-03 11:41:37 +04:00
parent 9b346e4c29
commit 7adb0dcbae
2 changed files with 32 additions and 0 deletions
@@ -36,6 +36,7 @@ import { REPLY_POLICY } from 'shared/constants/links';
import wootConstants from 'dashboard/constants/globals';
import { LOCAL_STORAGE_KEYS } from 'dashboard/constants/localStorage';
import { INBOX_TYPES } from 'dashboard/helper/inbox';
import { MESSAGE_TYPE } from 'shared/constants/messages';
export default {
components: {
@@ -244,6 +245,29 @@ export default {
return { incoming, outgoing };
},
hasSubmittedAppStoreResponse() {
const messages = this.currentChat.messages || [];
return messages.some(message => {
const appStoreAttributes =
message.content_attributes?.app_store ||
message.contentAttributes?.appStore ||
{};
const hasAppStoreResponse =
message.source_id || appStoreAttributes.response_id;
return (
message.message_type === MESSAGE_TYPE.OUTGOING && hasAppStoreResponse
);
});
},
appStoreReplyBannerMessage() {
return this.hasSubmittedAppStoreResponse
? this.$t('CONVERSATION.REPLYBOX.APP_STORE_RESPONSE_UPDATE')
: this.$t('CONVERSATION.REPLYBOX.APP_STORE_RESPONSE_DELAY');
},
showAppStoreReplyBanner() {
return this.isAnAppStoreChannel;
},
},
watch: {
@@ -468,6 +492,12 @@ export default {
class="mx-2 mt-2 overflow-hidden rounded-lg"
:banner-message="$t('CONVERSATION.OLD_INSTAGRAM_INBOX_REPLY_BANNER')"
/>
<Banner
v-if="showAppStoreReplyBanner"
color-scheme="warning"
class="mx-2 mt-2 overflow-hidden rounded-lg"
:banner-message="appStoreReplyBannerMessage"
/>
</div>
<MessageList
ref="conversationPanelRef"
@@ -236,6 +236,8 @@
"START_AUDIO_RECORDING": "Start audio recording",
"STOP_AUDIO_RECORDING": "Stop audio recording",
"COPILOT_THINKING": "Copilot is thinking",
"APP_STORE_RESPONSE_DELAY": "Apple may take up to 24 hours to make submitted replies or updates public.",
"APP_STORE_RESPONSE_UPDATE": "This review already has a reply. Apple may take up to 24 hours to make submitted replies or updates public. Sending another reply updates the existing public App Store response.",
"EMAIL_HEAD": {
"TO": "TO",
"ADD_BCC": "Add bcc",