Update widget colors based on the widgetConfig (#276)

This commit is contained in:
Pranav Raj S 2019-11-26 00:10:27 +05:30 committed by Sojan Jose
parent 9c6a101768
commit 5d2efdc7fc
11 changed files with 85 additions and 21 deletions

View file

@ -22,6 +22,7 @@ export default {
name: 'App',
methods: {
...mapActions('appConfig', ['setWidgetColor']),
...mapActions('conversation', ['fetchOldConversations']),
scrollConversationToBottom() {
const container = this.$el.querySelector('.conversation-wrap');
@ -35,10 +36,12 @@ export default {
event: 'loaded',
config: {
authToken: window.authToken,
channelConfig: window.chatwootWebChannel,
},
});
setHeader('X-Auth-Token', window.authToken);
}
this.setWidgetColor(window.chatwootWebChannel);
window.addEventListener('message', e => {
if (