misc_pterodactyl-panel/resources/assets/scripts/app.js

40 lines
958 B
JavaScript
Raw Normal View History

import Vue from 'vue';
2018-03-31 21:33:10 +00:00
import Vuex from 'vuex';
import vuexI18n from 'vuex-i18n';
import VueRouter from 'vue-router';
2018-06-17 23:53:24 +00:00
import VeeValidate from 'vee-validate';
2018-03-31 21:33:10 +00:00
Vue.config.productionTip = false;
2018-06-06 06:42:34 +00:00
require('./bootstrap');
2018-03-31 21:33:10 +00:00
// Helpers
import { Ziggy } from './helpers/ziggy';
import Locales from './../../../resources/lang/locales';
import { flash } from './mixins/flash';
2018-12-16 23:29:44 +00:00
import store from './store/index';
import router from './router';
window.events = new Vue();
window.Ziggy = Ziggy;
2018-03-31 21:33:10 +00:00
Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(vuexI18n.plugin, store);
2018-06-17 23:53:24 +00:00
Vue.use(VeeValidate);
// $FlowFixMe: this is always going to be unhappy because we ignore the vendor dir.
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
Vue.mixin({ methods: { route }});
Vue.mixin(flash);
2018-03-31 21:33:10 +00:00
Vue.i18n.add('en', Locales.en);
Vue.i18n.set('en');
// $FlowFixMe
if (module.hot) {
module.hot.accept();
}
new Vue({ store, router }).$mount('#pterodactyl');