2019-10-29 07:20:54 +00:00
|
|
|
import Vue from 'vue';
|
2020-01-09 07:36:40 +00:00
|
|
|
import Vuelidate from 'vuelidate';
|
2020-04-02 06:58:38 +00:00
|
|
|
import VueI18n from 'vue-i18n';
|
2019-10-29 07:20:54 +00:00
|
|
|
import store from '../widget/store';
|
|
|
|
import App from '../widget/App.vue';
|
|
|
|
import ActionCableConnector from '../widget/helpers/actionCable';
|
2020-04-02 06:58:38 +00:00
|
|
|
import i18n from '../widget/i18n';
|
2019-10-29 07:20:54 +00:00
|
|
|
|
2020-04-02 06:58:38 +00:00
|
|
|
Vue.use(VueI18n);
|
2020-01-09 07:36:40 +00:00
|
|
|
Vue.use(Vuelidate);
|
|
|
|
|
2020-12-12 06:38:36 +00:00
|
|
|
const i18nConfig = new VueI18n({
|
|
|
|
locale: 'en',
|
|
|
|
messages: i18n,
|
2020-04-02 06:58:38 +00:00
|
|
|
});
|
|
|
|
|
2020-07-07 18:34:44 +00:00
|
|
|
// Event Bus
|
|
|
|
window.bus = new Vue();
|
|
|
|
|
2019-10-29 07:20:54 +00:00
|
|
|
Vue.config.productionTip = false;
|
2020-07-07 18:34:44 +00:00
|
|
|
|
2019-10-29 07:20:54 +00:00
|
|
|
window.onload = () => {
|
|
|
|
window.WOOT_WIDGET = new Vue({
|
|
|
|
store,
|
2020-12-12 06:38:36 +00:00
|
|
|
i18n: i18nConfig,
|
2019-10-29 07:20:54 +00:00
|
|
|
render: h => h(App),
|
|
|
|
}).$mount('#app');
|
|
|
|
|
|
|
|
window.actionCable = new ActionCableConnector(
|
|
|
|
window.WOOT_WIDGET,
|
|
|
|
window.chatwootPubsubToken
|
|
|
|
);
|
|
|
|
};
|