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-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 20:35:18 +02:00
|
|
|
import FSwitch from './components/FSwitch.vue';
|
2021-04-11 11:19:55 +02:00
|
|
|
import FSelect from './components/FSelect.vue';
|
2021-04-11 17:37:26 +02:00
|
|
|
import FTextarea from './components/FTextarea.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';
|
2021-08-22 16:49:38 +02:00
|
|
|
import VTooltip from 'v-tooltip'
|
2020-04-10 20:32:12 +02:00
|
|
|
|
2021-04-10 19:45:11 +02:00
|
|
|
Vue.use(plugin)
|
2021-08-22 16:49:38 +02:00
|
|
|
Vue.use(VTooltip);
|
2021-04-10 19:45:11 +02:00
|
|
|
Vue.component('f-text', FText);
|
2021-04-11 20:35:18 +02:00
|
|
|
Vue.component('f-switch', FSwitch);
|
2021-04-11 11:19:55 +02:00
|
|
|
Vue.component('f-select', FSelect);
|
2021-04-11 17:37:26 +02:00
|
|
|
Vue.component('f-textarea', FTextarea);
|
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);
|
|
|
|
|