mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
fix: Add background to inbox channel badges (#3152)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
219a8c4bc5
commit
ec9903ae82
@@ -47,23 +47,29 @@ export default {
|
||||
const { medium: medium = '' } = this.inbox;
|
||||
return this.isATwilioChannel && medium === 'whatsapp';
|
||||
},
|
||||
chatAdditionalAttributes() {
|
||||
const { additional_attributes: additionalAttributes } = this.chat || {};
|
||||
return additionalAttributes || {};
|
||||
},
|
||||
isTwitterInboxTweet() {
|
||||
return (
|
||||
this.chat &&
|
||||
this.chat.additional_attributes &&
|
||||
this.chat.additional_attributes.type === 'tweet'
|
||||
);
|
||||
return this.chatAdditionalAttributes.type === 'tweet';
|
||||
},
|
||||
twilioBadge() {
|
||||
return `${this.isATwilioSMSChannel ? 'sms' : 'whatsapp'}`;
|
||||
},
|
||||
twitterBadge() {
|
||||
return `${this.isTwitterInboxTweet ? 'twitter-tweet' : 'twitter-chat'}`;
|
||||
return `${this.isTwitterInboxTweet ? 'twitter-tweet' : 'twitter-dm'}`;
|
||||
},
|
||||
facebookBadge() {
|
||||
return this.chatAdditionalAttributes.type || 'facebook';
|
||||
},
|
||||
inboxBadge() {
|
||||
if (this.isATwitterInbox) {
|
||||
return this.twitterBadge;
|
||||
}
|
||||
if (this.isAFacebookInbox) {
|
||||
return this.facebookBadge;
|
||||
}
|
||||
if (this.isATwilioChannel) {
|
||||
return this.twilioBadge;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user