mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
Enhancement: Conversation item redesign (#1857)
* Rearrange the inboxes label in conversations.
This commit is contained in:
28
app/javascript/dashboard/helper/inbox.js
Normal file
28
app/javascript/dashboard/helper/inbox.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { INBOX_TYPES } from 'shared/mixins/inboxMixin';
|
||||
|
||||
export const getInboxClassByType = (type, phoneNumber) => {
|
||||
switch (type) {
|
||||
case INBOX_TYPES.WEB:
|
||||
return 'ion-earth';
|
||||
|
||||
case INBOX_TYPES.FB:
|
||||
return 'ion-social-facebook';
|
||||
|
||||
case INBOX_TYPES.TWITTER:
|
||||
return 'ion-social-twitter';
|
||||
|
||||
case INBOX_TYPES.TWILIO:
|
||||
return phoneNumber.startsWith('whatsapp')
|
||||
? 'ion-social-whatsapp-outline'
|
||||
: 'ion-android-textsms';
|
||||
|
||||
case INBOX_TYPES.API:
|
||||
return 'ion-cloud';
|
||||
|
||||
case INBOX_TYPES.EMAIL:
|
||||
return 'ion-email';
|
||||
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user