fix: Add background to inbox channel badges (#3152)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
parent
219a8c4bc5
commit
ec9903ae82
20 changed files with 48 additions and 67 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue