2018-03-31 21:52:11 +01:00
|
|
|
import Vue from 'vue';
|
2018-03-31 22:33:10 +01:00
|
|
|
import Vuex from 'vuex';
|
2018-12-30 00:11:49 +00:00
|
|
|
import VueI18n from 'vue-i18n';
|
2018-03-31 21:52:11 +01:00
|
|
|
import VueRouter from 'vue-router';
|
2018-06-18 00:53:24 +01:00
|
|
|
import VeeValidate from 'vee-validate';
|
2018-03-31 22:33:10 +01:00
|
|
|
// Helpers
|
2018-12-30 00:11:49 +00:00
|
|
|
// @ts-ignore
|
|
|
|
import {Ziggy} from './helpers/ziggy';
|
|
|
|
// @ts-ignore
|
2018-05-26 20:33:27 +01:00
|
|
|
import Locales from './../../../resources/lang/locales';
|
2018-12-30 00:11:49 +00:00
|
|
|
|
|
|
|
import {flash} from './mixins/flash';
|
2018-12-16 23:29:44 +00:00
|
|
|
import store from './store/index';
|
2018-06-16 22:05:39 +01:00
|
|
|
import router from './router';
|
2018-03-31 21:52:11 +01:00
|
|
|
|
2018-12-30 00:11:49 +00:00
|
|
|
Vue.config.productionTip = false;
|
|
|
|
require('./bootstrap');
|
|
|
|
|
|
|
|
// @ts-ignore
|
2018-09-24 00:06:23 +01:00
|
|
|
window.events = new Vue();
|
2018-12-30 00:11:49 +00:00
|
|
|
// @ts-ignore
|
2018-03-31 21:52:11 +01:00
|
|
|
window.Ziggy = Ziggy;
|
|
|
|
|
2018-03-31 22:33:10 +01:00
|
|
|
Vue.use(Vuex);
|
2018-06-16 22:05:39 +01:00
|
|
|
Vue.use(VueRouter);
|
2018-06-18 00:53:24 +01:00
|
|
|
Vue.use(VeeValidate);
|
2018-12-30 00:11:49 +00:00
|
|
|
Vue.use(VueI18n);
|
2018-06-06 07:00:01 +01:00
|
|
|
|
2018-09-24 00:06:23 +01:00
|
|
|
// $FlowFixMe: this is always going to be unhappy because we ignore the vendor dir.
|
2018-05-26 20:33:27 +01:00
|
|
|
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
|
2018-03-31 21:52:11 +01:00
|
|
|
|
2018-12-30 00:11:49 +00:00
|
|
|
Vue.mixin({methods: {route}});
|
2018-05-26 22:50:38 +01:00
|
|
|
Vue.mixin(flash);
|
2018-03-31 21:52:11 +01:00
|
|
|
|
2018-12-30 00:11:49 +00:00
|
|
|
const i18n = new VueI18n({
|
|
|
|
locale: 'en',
|
|
|
|
messages: {...Locales},
|
|
|
|
});
|
2018-03-31 21:52:11 +01:00
|
|
|
|
2018-09-24 00:06:23 +01:00
|
|
|
// $FlowFixMe
|
2018-06-07 05:44:52 +01:00
|
|
|
if (module.hot) {
|
|
|
|
module.hot.accept();
|
|
|
|
}
|
|
|
|
|
2018-12-30 00:11:49 +00:00
|
|
|
new Vue({store, router, i18n}).$mount('#pterodactyl');
|