2020-04-10 20:32:12 +02:00
|
|
|
import Vue from 'vue';
|
2021-04-11 11:19:55 +02:00
|
|
|
import { App as InertiaApp, plugin } from '@inertiajs/inertia-vue'
|
2020-04-10 20:32:12 +02:00
|
|
|
import 'font-awesome/css/font-awesome.css';
|
2020-04-12 00:26:44 +02:00
|
|
|
import Echo from 'laravel-echo';
|
|
|
|
window.io = require('socket.io-client');
|
2021-04-11 00:57:47 +02:00
|
|
|
import Sprite from './components/Sprite.js';
|
2020-04-10 20:32:12 +02:00
|
|
|
|
2021-04-10 19:45:11 +02:00
|
|
|
import FText from './components/FText.vue';
|
2021-04-11 11:19:55 +02:00
|
|
|
import FSelect from './components/FSelect.vue';
|
2021-04-11 02:55:26 +02:00
|
|
|
import Pages from './components/Pages.vue';
|
|
|
|
import VBool from './components/VBool.vue';
|
2021-04-11 11:19:55 +02:00
|
|
|
import App from './layouts/App.vue';
|
2020-04-10 20:32:12 +02:00
|
|
|
|
2021-04-10 19:45:11 +02:00
|
|
|
Vue.use(plugin)
|
|
|
|
Vue.component('f-text', FText);
|
2021-04-11 11:19:55 +02:00
|
|
|
Vue.component('f-select', FSelect);
|
2021-04-11 00:57:47 +02:00
|
|
|
Vue.component('sprite', Sprite);
|
2021-04-11 02:55:26 +02:00
|
|
|
Vue.component('pages', Pages);
|
|
|
|
Vue.component('v-bool', VBool);
|
2020-04-10 20:32:12 +02:00
|
|
|
|
2021-04-10 19:45:11 +02:00
|
|
|
const el = document.getElementById('app')
|
2020-04-12 00:26:44 +02:00
|
|
|
|
2020-04-10 20:32:12 +02:00
|
|
|
new Vue({
|
2021-04-11 11:19:55 +02:00
|
|
|
render: h => h(InertiaApp, {
|
|
|
|
props: {
|
|
|
|
initialPage: JSON.parse(el.dataset.page),
|
|
|
|
resolveComponent: name => {
|
|
|
|
var page = require(`./views/${name}`).default;
|
|
|
|
|
|
|
|
if (page.layout === undefined) {
|
|
|
|
page.layout = App;
|
|
|
|
}
|
|
|
|
return page;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}),
|
2021-04-10 19:45:11 +02:00
|
|
|
}).$mount(el);
|
|
|
|
|