mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00

Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
42 lines
965 B
Vue
42 lines
965 B
Vue
<script>
|
|
import { mapGetters } from 'vuex';
|
|
import { IFrameHelper } from 'widget/helpers/utils';
|
|
import UnreadMessageList from '../components/UnreadMessageList.vue';
|
|
import { emitter } from 'shared/helpers/mitt';
|
|
|
|
export default {
|
|
name: 'Campaigns',
|
|
components: {
|
|
UnreadMessageList,
|
|
},
|
|
computed: {
|
|
...mapGetters({ campaign: 'campaign/getActiveCampaign' }),
|
|
messages() {
|
|
const { sender, id: campaignId, message: content } = this.campaign;
|
|
return [
|
|
{
|
|
content,
|
|
sender,
|
|
campaignId,
|
|
},
|
|
];
|
|
},
|
|
},
|
|
methods: {
|
|
closeFullView() {
|
|
if (IFrameHelper.isIFrame()) {
|
|
IFrameHelper.sendMessage({
|
|
event: 'setCampaignReadOn',
|
|
});
|
|
IFrameHelper.sendMessage({ event: 'toggleBubble' });
|
|
emitter.emit('snooze-campaigns');
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<UnreadMessageList :messages="messages" @close="closeFullView" />
|
|
</template>
|