2019-11-16 10:21:14 +03:00
|
|
|
require('./bootstrap');
|
|
|
|
|
|
|
|
import Vue from 'vue';
|
|
|
|
import VueRouter from 'vue-router';
|
|
|
|
import DashboardPlugin from './plugins/dashboard-plugin';
|
|
|
|
|
|
|
|
import Install from './Install.vue';
|
|
|
|
|
|
|
|
import Form from './plugins/form';
|
|
|
|
|
|
|
|
// plugin setup
|
|
|
|
Vue.use(DashboardPlugin);
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
import Requirements from './views/install/Requirements';
|
|
|
|
import Language from './views/install/Language';
|
|
|
|
import Database from './views/install/Database';
|
|
|
|
import Settings from './views/install/Settings';
|
|
|
|
|
2019-11-22 15:16:11 +03:00
|
|
|
var global_path = new URL(url).protocol + '//' + window.location.host;
|
|
|
|
var base_path = url.replace(global_path, '');
|
2019-11-16 10:21:14 +03:00
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
mode: 'history',
|
|
|
|
base: base_path,
|
|
|
|
routes: [
|
|
|
|
{
|
|
|
|
path: '/',
|
2019-11-22 15:16:11 +03:00
|
|
|
name: 'home',
|
2019-11-16 10:21:14 +03:00
|
|
|
component: Requirements
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/install/requirements',
|
|
|
|
name: 'requirements',
|
|
|
|
component: Requirements
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/install/language',
|
|
|
|
name: 'language',
|
|
|
|
component: Language
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/install/database',
|
|
|
|
name: 'database',
|
|
|
|
component: Database
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/install/settings',
|
|
|
|
name: 'settings',
|
|
|
|
component: Settings
|
|
|
|
}
|
|
|
|
],
|
|
|
|
linkActiveClass: 'active',
|
|
|
|
scrollBehavior: (to, from ,savedPosition) => {
|
|
|
|
if (savedPosition) {
|
|
|
|
return savedPosition;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (to.hash) {
|
|
|
|
return { selector: to.hash };
|
|
|
|
}
|
|
|
|
|
|
|
|
return { x: 0, y: 0 };
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/* eslint-disable no-new */
|
|
|
|
new Vue({
|
|
|
|
el : '#app',
|
|
|
|
render: h => h(Install),
|
|
|
|
router
|
|
|
|
});
|