@@ -22,7 +22,9 @@
:text-color="textColor"
@click="startConversation"
>
- {{ $t('START_CONVERSATION') }}
+ {{
+ hasConversation ? $t('CONTINUE_CONVERSATION') : $t('START_CONVERSATION')
+ }}
@@ -47,6 +49,10 @@ export default {
type: Array,
default: () => {},
},
+ hasConversation: {
+ type: Boolean,
+ default: false,
+ },
},
computed: {
...mapGetters({ widgetColor: 'appConfig/getWidgetColor' }),
diff --git a/app/javascript/widget/components/UnreadMessage.vue b/app/javascript/widget/components/UnreadMessage.vue
index 48a6b4686..13e8fc250 100644
--- a/app/javascript/widget/components/UnreadMessage.vue
+++ b/app/javascript/widget/components/UnreadMessage.vue
@@ -21,6 +21,10 @@ import messageFormatterMixin from 'shared/mixins/messageFormatterMixin';
import Thumbnail from 'dashboard/components/widgets/Thumbnail';
import configMixin from '../mixins/configMixin';
import { isEmptyObject } from 'widget/helpers/utils';
+import {
+ ON_CAMPAIGN_MESSAGE_CLICK,
+ ON_UNREAD_MESSAGE_CLICK,
+} from '../constants/widgetBusEvents';
export default {
name: 'UnreadMessage',
components: { Thumbnail },
@@ -82,9 +86,9 @@ export default {
},
onClickMessage() {
if (this.campaignId) {
- bus.$emit('on-campaign-view-clicked', this.campaignId);
+ bus.$emit(ON_CAMPAIGN_MESSAGE_CLICK, this.campaignId);
} else {
- bus.$emit('on-unread-view-clicked');
+ bus.$emit(ON_UNREAD_MESSAGE_CLICK);
}
},
},
diff --git a/app/javascript/widget/views/Unread.vue b/app/javascript/widget/components/UnreadMessageList.vue
similarity index 68%
rename from app/javascript/widget/views/Unread.vue
rename to app/javascript/widget/components/UnreadMessageList.vue
index 7eafbdbe2..a3368d4e9 100644
--- a/app/javascript/widget/views/Unread.vue
+++ b/app/javascript/widget/components/UnreadMessageList.vue
@@ -1,20 +1,16 @@
-
-
+
{{ $t('UNREAD_VIEW.VIEW_MESSAGES_BUTTON') }}
-
+
@@ -44,7 +40,7 @@
import { IFrameHelper } from 'widget/helpers/utils';
import { mapGetters } from 'vuex';
import configMixin from '../mixins/configMixin';
-
+import { ON_UNREAD_MESSAGE_CLICK } from '../constants/widgetBusEvents';
import FluentIcon from 'shared/components/FluentIcon/Index.vue';
import UnreadMessage from 'widget/components/UnreadMessage.vue';
@@ -56,58 +52,25 @@ export default {
},
mixins: [configMixin],
props: {
- hasFetched: {
- type: Boolean,
- default: false,
- },
- unreadMessageCount: {
- type: Number,
- default: 0,
- },
- hideMessageBubble: {
- type: Boolean,
- default: false,
- },
- showUnreadView: {
- type: Boolean,
- default: false,
+ messages: {
+ type: Array,
+ required: true,
},
},
computed: {
- ...mapGetters({
- unreadMessages: 'conversation/getUnreadTextMessages',
- campaign: 'campaign/getActiveCampaign',
- }),
- showCloseButton() {
- return this.unreadMessageCount;
- },
+ ...mapGetters({ unreadMessageCount: 'conversation/getUnreadMessageCount' }),
sender() {
- const [firstMessage] = this.unreadMessages;
+ const [firstMessage] = this.messages;
return firstMessage.sender || {};
},
- allMessages() {
- if (this.showUnreadView) {
- return this.unreadMessages;
- }
- const { sender, id: campaignId, message: content } = this.campaign;
- return [
- {
- content,
- sender,
- campaignId,
- },
- ];
- },
},
methods: {
- openFullView() {
- bus.$emit('on-unread-view-clicked');
+ openConversationView() {
+ bus.$emit(ON_UNREAD_MESSAGE_CLICK);
},
closeFullView() {
if (IFrameHelper.isIFrame()) {
- IFrameHelper.sendMessage({
- event: 'toggleBubble',
- });
+ IFrameHelper.sendMessage({ event: 'toggleBubble' });
}
},
getMessageContent(message) {
diff --git a/app/javascript/widget/components/layouts/ViewWithHeader.vue b/app/javascript/widget/components/layouts/ViewWithHeader.vue
new file mode 100644
index 000000000..f4111eebf
--- /dev/null
+++ b/app/javascript/widget/components/layouts/ViewWithHeader.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/javascript/widget/constants/widgetBusEvents.js b/app/javascript/widget/constants/widgetBusEvents.js
new file mode 100644
index 000000000..769b941ee
--- /dev/null
+++ b/app/javascript/widget/constants/widgetBusEvents.js
@@ -0,0 +1,3 @@
+export const ON_AGENT_MESSAGE_RECEIVED = 'ON_AGENT_MESSAGE_RECEIVED';
+export const ON_UNREAD_MESSAGE_CLICK = 'ON_UNREAD_MESSAGE_CLICK';
+export const ON_CAMPAIGN_MESSAGE_CLICK = 'ON_CAMPAIGN_MESSAGE_CLICK';
diff --git a/app/javascript/widget/helpers/actionCable.js b/app/javascript/widget/helpers/actionCable.js
index 728e607b5..c5c262c1b 100644
--- a/app/javascript/widget/helpers/actionCable.js
+++ b/app/javascript/widget/helpers/actionCable.js
@@ -1,5 +1,6 @@
import BaseActionCableConnector from '../../shared/helpers/BaseActionCableConnector';
import { playNewMessageNotificationInWidget } from 'shared/helpers/AudioNotificationHelper';
+import { ON_AGENT_MESSAGE_RECEIVED } from '../constants/widgetBusEvents';
class ActionCableConnector extends BaseActionCableConnector {
constructor(app, pubsubToken) {
@@ -22,9 +23,7 @@ class ActionCableConnector extends BaseActionCableConnector {
onMessageCreated = data => {
this.app.$store
.dispatch('conversation/addOrUpdateMessage', data)
- .then(() => {
- window.bus.$emit('on-agent-message-received');
- });
+ .then(() => window.bus.$emit(ON_AGENT_MESSAGE_RECEIVED));
if (data.sender_type === 'User') {
playNewMessageNotificationInWidget();
}
diff --git a/app/javascript/widget/i18n/locale/en.json b/app/javascript/widget/i18n/locale/en.json
index 046c87cc1..7718ea4d1 100644
--- a/app/javascript/widget/i18n/locale/en.json
+++ b/app/javascript/widget/i18n/locale/en.json
@@ -22,6 +22,7 @@
"IN_A_DAY": "Typically replies in a day"
},
"START_CONVERSATION": "Start Conversation",
+ "CONTINUE_CONVERSATION": "Continue conversation",
"START_NEW_CONVERSATION": "Start a new conversation",
"UNREAD_VIEW": {
"VIEW_MESSAGES_BUTTON": "See new messages",
diff --git a/app/javascript/widget/mixins/configMixin.js b/app/javascript/widget/mixins/configMixin.js
index 53cc26a00..c91730767 100644
--- a/app/javascript/widget/mixins/configMixin.js
+++ b/app/javascript/widget/mixins/configMixin.js
@@ -25,10 +25,8 @@ export default {
let requireEmail = false;
let preChatMessage = '';
const options = window.chatwootWebChannel.preChatFormOptions || {};
- if (!this.isOnNewConversation) {
- requireEmail = options.require_email;
- preChatMessage = options.pre_chat_message;
- }
+ requireEmail = options.require_email;
+ preChatMessage = options.pre_chat_message;
return {
requireEmail,
preChatMessage,
diff --git a/app/javascript/widget/mixins/routerMixin.js b/app/javascript/widget/mixins/routerMixin.js
new file mode 100644
index 000000000..f75cc65e1
--- /dev/null
+++ b/app/javascript/widget/mixins/routerMixin.js
@@ -0,0 +1,10 @@
+export default {
+ methods: {
+ async replaceRoute(name) {
+ if (this.$route.name !== name) {
+ return this.$router.replace({ name });
+ }
+ return undefined;
+ },
+ },
+};
diff --git a/app/javascript/widget/router.js b/app/javascript/widget/router.js
index 36954b6ae..a07d37498 100755
--- a/app/javascript/widget/router.js
+++ b/app/javascript/widget/router.js
@@ -1,24 +1,42 @@
import Vue from 'vue';
import Router from 'vue-router';
-import Home from './views/Home.vue';
+import ViewWithHeader from './components/layouts/ViewWithHeader.vue';
Vue.use(Router);
export default new Router({
+ mode: 'hash',
routes: [
{
- path: '/',
- name: 'home',
- component: Home,
+ path: '/unread-messages',
+ name: 'unread-messages',
+ component: () => import('./views/UnreadMessages.vue'),
+ },
+ {
+ path: '/campaigns',
+ name: 'campaigns',
+ component: () => import('./views/Campaigns.vue'),
+ },
+ {
+ path: '/',
+ component: ViewWithHeader,
+ children: [
+ {
+ path: '',
+ name: 'home',
+ component: () => import('./views/Home.vue'),
+ },
+ {
+ path: '/prechat-form',
+ name: 'prechat-form',
+ component: () => import('./views/PreChatForm.vue'),
+ },
+ {
+ path: '/messages',
+ name: 'messages',
+ component: () => import('./views/Messages.vue'),
+ },
+ ],
},
- // {
- // path: '/about',
- // name: 'about',
- // // route level code-splitting
- // // this generates a separate chunk (about.[hash].js) for this route
- // // which is lazy-loaded when the route is visited.
- // component: () =>
- // import(/* webpackChunkName: "about" */ './views/About.vue'),
- // },
],
});
diff --git a/app/javascript/widget/store/modules/appConfig.js b/app/javascript/widget/store/modules/appConfig.js
index e04f868b3..74c4bed6e 100644
--- a/app/javascript/widget/store/modules/appConfig.js
+++ b/app/javascript/widget/store/modules/appConfig.js
@@ -1,18 +1,43 @@
-import { SET_REFERRER_HOST, SET_WIDGET_COLOR } from '../types';
+import {
+ SET_REFERRER_HOST,
+ SET_WIDGET_APP_CONFIG,
+ SET_WIDGET_COLOR,
+ TOGGLE_WIDGET_OPEN,
+} from '../types';
const state = {
+ showPopoutButton: false,
+ hideMessageBubble: false,
+ position: 'right',
+ isWebWidgetTriggered: false,
+ isCampaignViewClicked: false,
+ isWidgetOpen: false,
widgetColor: '',
referrerHost: '',
};
export const getters = {
+ getAppConfig: $state => $state,
+ isRightAligned: $state => $state.position === 'right',
+ getHideMessageBubble: $state => $state.hideMessageBubble,
+ getIsWidgetOpen: $state => $state.isWidgetOpen,
getWidgetColor: $state => $state.widgetColor,
getReferrerHost: $state => $state.referrerHost,
};
export const actions = {
- setWidgetColor({ commit }, data) {
- commit(SET_WIDGET_COLOR, data);
+ setAppConfig({ commit }, { showPopoutButton, position, hideMessageBubble }) {
+ commit(SET_WIDGET_APP_CONFIG, {
+ showPopoutButton: !!showPopoutButton,
+ position: position || 'right',
+ hideMessageBubble: !!hideMessageBubble,
+ });
+ },
+ toggleWidgetOpen({ commit }, isWidgetOpen) {
+ commit(TOGGLE_WIDGET_OPEN, isWidgetOpen);
+ },
+ setWidgetColor({ commit }, widgetColor) {
+ commit(SET_WIDGET_COLOR, widgetColor);
},
setReferrerHost({ commit }, referrerHost) {
commit(SET_REFERRER_HOST, referrerHost);
@@ -20,8 +45,16 @@ export const actions = {
};
export const mutations = {
- [SET_WIDGET_COLOR]($state, data) {
- $state.widgetColor = data.widgetColor;
+ [SET_WIDGET_APP_CONFIG]($state, data) {
+ $state.showPopoutButton = data.showPopoutButton;
+ $state.position = data.position;
+ $state.hideMessageBubble = data.hideMessageBubble;
+ },
+ [TOGGLE_WIDGET_OPEN]($state, isWidgetOpen) {
+ $state.isWidgetOpen = isWidgetOpen;
+ },
+ [SET_WIDGET_COLOR]($state, widgetColor) {
+ $state.widgetColor = widgetColor;
},
[SET_REFERRER_HOST]($state, referrerHost) {
$state.referrerHost = referrerHost;
diff --git a/app/javascript/widget/store/modules/campaign.js b/app/javascript/widget/store/modules/campaign.js
index 1f9a31150..673f52567 100644
--- a/app/javascript/widget/store/modules/campaign.js
+++ b/app/javascript/widget/store/modules/campaign.js
@@ -9,10 +9,8 @@ const state = {
records: [],
uiFlags: {
isError: false,
- hasFetched: false,
},
activeCampaign: {},
- campaignHasExecuted: false,
};
const resetCampaignTimers = (
@@ -32,10 +30,8 @@ const resetCampaignTimers = (
};
export const getters = {
- getHasFetched: $state => $state.uiFlags.hasFetched,
getCampaigns: $state => $state.records,
getActiveCampaign: $state => $state.activeCampaign,
- getCampaignHasExecuted: $state => $state.campaignHasExecuted,
};
export const actions = {
@@ -47,7 +43,6 @@ export const actions = {
const { data: campaigns } = await getCampaigns(websiteToken);
commit('setCampaigns', campaigns);
commit('setError', false);
- commit('setHasFetched', true);
resetCampaignTimers(
campaigns,
currentURL,
@@ -56,7 +51,6 @@ export const actions = {
);
} catch (error) {
commit('setError', true);
- commit('setHasFetched', true);
}
},
initCampaigns: async (
@@ -82,13 +76,13 @@ export const actions = {
{
commit,
rootState: {
- events: { isOpen },
+ appConfig: { isWidgetOpen },
},
},
{ websiteToken, campaignId }
) => {
// Disable campaign execution if widget is opened
- if (!isOpen) {
+ if (!isWidgetOpen) {
const { data: campaigns } = await getCampaigns(websiteToken);
// Check campaign is disabled or not
const campaign = campaigns.find(item => item.id === campaignId);
@@ -100,11 +94,21 @@ export const actions = {
executeCampaign: async ({ commit }, { campaignId, websiteToken }) => {
try {
+ commit(
+ 'conversation/setConversationUIFlag',
+ { isCreating: true },
+ { root: true }
+ );
await triggerCampaign({ campaignId, websiteToken });
- commit('setCampaignExecuted');
commit('setActiveCampaign', {});
} catch (error) {
commit('setError', true);
+ } finally {
+ commit(
+ 'conversation/setConversationUIFlag',
+ { isCreating: false },
+ { root: true }
+ );
}
},
resetCampaign: async ({ commit }) => {
@@ -126,12 +130,6 @@ export const mutations = {
setError($state, value) {
Vue.set($state.uiFlags, 'isError', value);
},
- setHasFetched($state, value) {
- Vue.set($state.uiFlags, 'hasFetched', value);
- },
- setCampaignExecuted($state) {
- Vue.set($state, 'campaignHasExecuted', true);
- },
};
export default {
diff --git a/app/javascript/widget/store/modules/events.js b/app/javascript/widget/store/modules/events.js
index cadf0e18e..3fa38147d 100644
--- a/app/javascript/widget/store/modules/events.js
+++ b/app/javascript/widget/store/modules/events.js
@@ -1,9 +1,5 @@
import events from 'widget/api/events';
-const state = {
- isOpen: false,
-};
-
const actions = {
create: async (_, { name }) => {
try {
@@ -14,16 +10,10 @@ const actions = {
},
};
-const mutations = {
- toggleOpen($state) {
- $state.isOpen = !$state.isOpen;
- },
-};
-
export default {
namespaced: true,
- state,
+ state: {},
getters: {},
actions,
- mutations,
+ mutations: {},
};
diff --git a/app/javascript/widget/store/modules/specs/agent/mutations.spec.js b/app/javascript/widget/store/modules/specs/agent/mutations.spec.js
index 5d1ddaaa7..f29bb97d9 100644
--- a/app/javascript/widget/store/modules/specs/agent/mutations.spec.js
+++ b/app/javascript/widget/store/modules/specs/agent/mutations.spec.js
@@ -18,7 +18,7 @@ describe('#mutations', () => {
});
});
- describe('#setError', () => {
+ describe('#setHasFetched', () => {
it('set fetched flag', () => {
const state = { records: [], uiFlags: {} };
mutations.setHasFetched(state, true);
diff --git a/app/javascript/widget/store/modules/specs/appConfig/actions.spec.js b/app/javascript/widget/store/modules/specs/appConfig/actions.spec.js
index cf1366226..7a5f47e87 100644
--- a/app/javascript/widget/store/modules/specs/appConfig/actions.spec.js
+++ b/app/javascript/widget/store/modules/specs/appConfig/actions.spec.js
@@ -13,10 +13,8 @@ describe('#actions', () => {
describe('#setWidgetColor', () => {
it('creates actions properly', () => {
- actions.setWidgetColor({ commit }, { widgetColor: '#eaeaea' });
- expect(commit.mock.calls).toEqual([
- ['SET_WIDGET_COLOR', { widgetColor: '#eaeaea' }],
- ]);
+ actions.setWidgetColor({ commit }, '#eaeaea');
+ expect(commit.mock.calls).toEqual([['SET_WIDGET_COLOR', '#eaeaea']]);
});
});
});
diff --git a/app/javascript/widget/store/modules/specs/appConfig/mutations.spec.js b/app/javascript/widget/store/modules/specs/appConfig/mutations.spec.js
index f8d90bf26..77a8cb096 100644
--- a/app/javascript/widget/store/modules/specs/appConfig/mutations.spec.js
+++ b/app/javascript/widget/store/modules/specs/appConfig/mutations.spec.js
@@ -12,7 +12,7 @@ describe('#mutations', () => {
describe('#SET_WIDGET_COLOR', () => {
it('sets widget color properly', () => {
const state = { widgetColor: '' };
- mutations.SET_WIDGET_COLOR(state, { widgetColor: '#00bcd4' });
+ mutations.SET_WIDGET_COLOR(state, '#00bcd4');
expect(state.widgetColor).toEqual('#00bcd4');
});
});
diff --git a/app/javascript/widget/store/modules/specs/campaign/actions.spec.js b/app/javascript/widget/store/modules/specs/campaign/actions.spec.js
index 49f441111..cdd3bf12c 100644
--- a/app/javascript/widget/store/modules/specs/campaign/actions.spec.js
+++ b/app/javascript/widget/store/modules/specs/campaign/actions.spec.js
@@ -24,7 +24,6 @@ describe('#actions', () => {
expect(commit.mock.calls).toEqual([
['setCampaigns', campaigns],
['setError', false],
- ['setHasFetched', true],
]);
expect(campaignTimer.initTimers).toHaveBeenCalledWith(
{
@@ -50,10 +49,7 @@ describe('#actions', () => {
isInBusinessHours: true,
}
);
- expect(commit.mock.calls).toEqual([
- ['setError', true],
- ['setHasFetched', true],
- ]);
+ expect(commit.mock.calls).toEqual([['setError', true]]);
});
});
describe('#initCampaigns', () => {
@@ -99,7 +95,7 @@ describe('#actions', () => {
getters: { getCampaigns: campaigns },
commit,
rootState: {
- events: { isOpen: true },
+ appConfig: { isWidgetOpen: true },
},
},
{ campaignId: 32 }
@@ -113,7 +109,7 @@ describe('#actions', () => {
getters: { getCampaigns: campaigns },
commit,
rootState: {
- events: { isOpen: false },
+ appConfig: { isWidgetOpen: false },
},
},
{ campaignId: 1 }
@@ -127,15 +123,52 @@ describe('#actions', () => {
API.post.mockResolvedValue({});
await actions.executeCampaign({ commit }, params);
expect(commit.mock.calls).toEqual([
- ['setCampaignExecuted'],
+ [
+ 'conversation/setConversationUIFlag',
+ {
+ isCreating: true,
+ },
+ {
+ root: true,
+ },
+ ],
['setActiveCampaign', {}],
+ [
+ 'conversation/setConversationUIFlag',
+ {
+ isCreating: false,
+ },
+ {
+ root: true,
+ },
+ ],
]);
});
it('sends correct actions if execute campaign API is failed', async () => {
const params = { campaignId: 12, websiteToken: 'XDsafmADasd' };
API.post.mockRejectedValue({ message: 'Authentication required' });
await actions.executeCampaign({ commit }, params);
- expect(commit.mock.calls).toEqual([['setError', true]]);
+ expect(commit.mock.calls).toEqual([
+ [
+ 'conversation/setConversationUIFlag',
+ {
+ isCreating: true,
+ },
+ {
+ root: true,
+ },
+ ],
+ ['setError', true],
+ [
+ 'conversation/setConversationUIFlag',
+ {
+ isCreating: false,
+ },
+ {
+ root: true,
+ },
+ ],
+ ]);
});
});
diff --git a/app/javascript/widget/store/modules/specs/campaign/getters.spec.js b/app/javascript/widget/store/modules/specs/campaign/getters.spec.js
index ceb9185e2..2d027426c 100644
--- a/app/javascript/widget/store/modules/specs/campaign/getters.spec.js
+++ b/app/javascript/widget/store/modules/specs/campaign/getters.spec.js
@@ -129,17 +129,4 @@ describe('#getters', () => {
updated_at: '2021-05-03T04:53:36.354Z',
});
});
- it('getCampaignHasExecuted', () => {
- const state = {
- records: [],
- uiFlags: {
- isError: false,
- hasFetched: false,
- },
- activeCampaign: {},
- campaignHasExecuted: false,
- };
-
- expect(getters.getCampaignHasExecuted(state)).toEqual(false);
- });
});
diff --git a/app/javascript/widget/store/modules/specs/campaign/mutations.spec.js b/app/javascript/widget/store/modules/specs/campaign/mutations.spec.js
index 7a519028e..b35d0df15 100644
--- a/app/javascript/widget/store/modules/specs/campaign/mutations.spec.js
+++ b/app/javascript/widget/store/modules/specs/campaign/mutations.spec.js
@@ -18,14 +18,6 @@ describe('#mutations', () => {
});
});
- describe('#setHasFetched', () => {
- it('set fetched flag', () => {
- const state = { records: [], uiFlags: {} };
- mutations.setHasFetched(state, true);
- expect(state.uiFlags.hasFetched).toEqual(true);
- });
- });
-
describe('#setActiveCampaign', () => {
it('set active campaign', () => {
const state = { records: [] };
@@ -33,12 +25,4 @@ describe('#mutations', () => {
expect(state.activeCampaign).toEqual(campaigns[0]);
});
});
-
- describe('#setCampaignExecuted', () => {
- it('set campaign executed flag', () => {
- const state = { records: [], uiFlags: {}, campaignHasExecuted: false };
- mutations.setCampaignExecuted(state);
- expect(state.campaignHasExecuted).toEqual(true);
- });
- });
});
diff --git a/app/javascript/widget/store/types.js b/app/javascript/widget/store/types.js
index a5ab12420..b7d2da402 100644
--- a/app/javascript/widget/store/types.js
+++ b/app/javascript/widget/store/types.js
@@ -1,6 +1,7 @@
-export const SET_WIDGET_COLOR = 'SET_WIDGET_COLOR';
-export const SET_REFERRER_HOST = 'SET_REFERRER_HOST';
-
-export const SET_CONVERSATION_ATTRIBUTES = 'SET_CONVERSATION_ATTRIBUTES';
-export const UPDATE_CONVERSATION_ATTRIBUTES = 'UPDATE_CONVERSATION_ATTRIBUTES';
export const CLEAR_CONVERSATION_ATTRIBUTES = 'CLEAR_CONVERSATION_ATTRIBUTES';
+export const SET_CONVERSATION_ATTRIBUTES = 'SET_CONVERSATION_ATTRIBUTES';
+export const SET_WIDGET_APP_CONFIG = 'SET_WIDGET_APP_CONFIG';
+export const SET_WIDGET_COLOR = 'SET_WIDGET_COLOR';
+export const UPDATE_CONVERSATION_ATTRIBUTES = 'UPDATE_CONVERSATION_ATTRIBUTES';
+export const TOGGLE_WIDGET_OPEN = 'TOGGLE_WIDGET_OPEN';
+export const SET_REFERRER_HOST = 'SET_REFERRER_HOST';
diff --git a/app/javascript/widget/views/Campaigns.vue b/app/javascript/widget/views/Campaigns.vue
new file mode 100644
index 000000000..6bd28b7fa
--- /dev/null
+++ b/app/javascript/widget/views/Campaigns.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
diff --git a/app/javascript/widget/views/Home.vue b/app/javascript/widget/views/Home.vue
index 33deb60e1..32aae26f1 100755
--- a/app/javascript/widget/views/Home.vue
+++ b/app/javascript/widget/views/Home.vue
@@ -1,113 +1,33 @@
-
-
-
-
-
-
+
-
-
diff --git a/app/javascript/widget/views/Messages.vue b/app/javascript/widget/views/Messages.vue
new file mode 100644
index 000000000..785a54316
--- /dev/null
+++ b/app/javascript/widget/views/Messages.vue
@@ -0,0 +1,27 @@
+
+
+
+
diff --git a/app/javascript/widget/views/PreChatForm.vue b/app/javascript/widget/views/PreChatForm.vue
new file mode 100644
index 000000000..ac70e4e56
--- /dev/null
+++ b/app/javascript/widget/views/PreChatForm.vue
@@ -0,0 +1,49 @@
+
+
+
+
diff --git a/app/javascript/widget/views/Router.vue b/app/javascript/widget/views/Router.vue
deleted file mode 100644
index fb90cbd24..000000000
--- a/app/javascript/widget/views/Router.vue
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/app/javascript/widget/views/UnreadMessages.vue b/app/javascript/widget/views/UnreadMessages.vue
new file mode 100644
index 000000000..d7e52a382
--- /dev/null
+++ b/app/javascript/widget/views/UnreadMessages.vue
@@ -0,0 +1,20 @@
+
+
+
+
+