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

42 lines
903 B
TypeScript
Raw Normal View History

import Vue from 'vue';
2018-03-31 21:33:10 +00:00
import Vuex from 'vuex';
2018-12-30 00:11:49 +00:00
import VueI18n from 'vue-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
// Helpers
2018-12-30 00:11:49 +00:00
// @ts-ignore
import {Ziggy} from './helpers/ziggy';
// @ts-ignore
import Locales from './../../../resources/lang/locales';
2018-12-30 00:11:49 +00:00
2018-12-30 03:24:09 +00:00
import {FlashMixin} from './mixins/flash';
2018-12-16 23:29:44 +00:00
import store from './store/index';
import router from './router';
2018-12-30 00:11:49 +00:00
Vue.config.productionTip = false;
require('./bootstrap');
window.events = new Vue();
window.Ziggy = Ziggy;
2018-03-31 21:33:10 +00:00
Vue.use(Vuex);
Vue.use(VueRouter);
2018-06-17 23:53:24 +00:00
Vue.use(VeeValidate);
2018-12-30 00:11:49 +00:00
Vue.use(VueI18n);
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
2018-12-30 00:11:49 +00:00
Vue.mixin({methods: {route}});
2018-12-30 03:24:09 +00:00
Vue.mixin(FlashMixin);
2018-12-30 00:11:49 +00:00
const i18n = new VueI18n({
locale: 'en',
messages: {...Locales},
});
if (module.hot) {
module.hot.accept();
}
2018-12-30 00:11:49 +00:00
new Vue({store, router, i18n}).$mount('#pterodactyl');