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 router from '../widget/router';
|
|
|
|
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-04-02 06:58:38 +00:00
|
|
|
Vue.config.lang = 'en';
|
|
|
|
Object.keys(i18n).forEach(lang => {
|
|
|
|
Vue.locale(lang, i18n[lang]);
|
|
|
|
});
|
|
|
|
|
2019-10-29 07:20:54 +00:00
|
|
|
Vue.config.productionTip = false;
|
|
|
|
window.onload = () => {
|
|
|
|
window.WOOT_WIDGET = new Vue({
|
|
|
|
router,
|
|
|
|
store,
|
|
|
|
render: h => h(App),
|
|
|
|
}).$mount('#app');
|
|
|
|
|
|
|
|
window.actionCable = new ActionCableConnector(
|
|
|
|
window.WOOT_WIDGET,
|
|
|
|
window.chatwootPubsubToken
|
|
|
|
);
|
|
|
|
};
|