Shivam Mishra
2024-10-02 13:06:30 +05:30
committed by GitHub
parent e0bf2bd9d4
commit 42f6621afb
661 changed files with 15939 additions and 31194 deletions

View File

@@ -7,6 +7,8 @@ import {
ON_CAMPAIGN_MESSAGE_CLICK,
ON_UNREAD_MESSAGE_CLICK,
} from '../constants/widgetBusEvents';
import { emitter } from 'shared/helpers/mitt';
import { useDarkMode } from 'widget/composables/useDarkMode';
export default {
name: 'UnreadMessage',
@@ -50,10 +52,9 @@ export default {
},
avatarUrl() {
// eslint-disable-next-line
const BotImage = require('dashboard/assets/images/chatwoot_bot.png');
const displayImage = this.useInboxAvatarForBot
? this.inboxAvatarUrl
: BotImage;
: '/assets/images/chatwoot_bot.png';
if (this.isSenderExist(this.sender)) {
const { avatar_url: avatarUrl } = this.sender;
return avatarUrl;
@@ -84,9 +85,9 @@ export default {
},
onClickMessage() {
if (this.campaignId) {
this.$emitter.emit(ON_CAMPAIGN_MESSAGE_CLICK, this.campaignId);
emitter.emit(ON_CAMPAIGN_MESSAGE_CLICK, this.campaignId);
} else {
this.$emitter.emit(ON_UNREAD_MESSAGE_CLICK);
emitter.emit(ON_UNREAD_MESSAGE_CLICK);
}
},
},
@@ -119,7 +120,8 @@ export default {
</template>
<style lang="scss" scoped>
@import '~widget/assets/scss/variables.scss';
@import 'widget/assets/scss/variables.scss';
.chat-bubble {
max-width: 85%;
padding: $space-normal;
@@ -132,10 +134,12 @@ export default {
text-align: left;
padding-bottom: $space-small;
font-size: $font-size-small;
.agent--name {
font-weight: $font-weight-medium;
margin-left: $space-smaller;
}
.company--name {
color: $color-light-gray;
margin-left: $space-smaller;