v2 first commit
This commit is contained in:
71
resources/assets/js/install.js
vendored
Normal file
71
resources/assets/js/install.js
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
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';
|
||||
|
||||
var base_path = url.replace(window.location.origin, '');
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: base_path,
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'requirements',
|
||||
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
|
||||
});
|
Reference in New Issue
Block a user