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

47 lines
1.1 KiB
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-03-31 21:33:10 +00:00
// Helpers
import { Ziggy } from './helpers/ziggy';
import Locales from './../../../resources/lang/locales';
import { flash } from './mixins/flash';
import fontawesome from '@fortawesome/fontawesome';
import faSolid from '@fortawesome/fontawesome-free-solid';
import FontAwesomeIcon from '@fortawesome/vue-fontawesome';
fontawesome.library.add(faSolid);
import { routes } from './routes';
2018-06-03 22:45:01 +00:00
import createStore from './store';
window.events = new Vue;
window.Ziggy = Ziggy;
2018-06-03 22:45:01 +00:00
Vue.use(VueRouter);
const router = new VueRouter({
mode: 'history', routes
});
2018-03-31 21:33:10 +00:00
Vue.use(Vuex);
2018-06-03 22:45:01 +00:00
const store = createStore(router);
const route = require('./../../../vendor/tightenco/ziggy/src/js/route').default;
Vue.config.productionTip = false;
2018-04-08 21:00:52 +00:00
Vue.mixin({ methods: { route } });
Vue.mixin(flash);
2018-03-31 21:33:10 +00:00
Vue.use(vuexI18n.plugin, store);
Vue.i18n.add('en', Locales.en);
Vue.i18n.set('en');
Vue.component('font-awesome-icon', FontAwesomeIcon);
2018-03-31 21:33:10 +00:00
require('./bootstrap');
2018-04-08 21:00:52 +00:00
const app = new Vue({ store, router }).$mount('#pterodactyl');