Hoist router
This commit is contained in:
parent
c770cd017e
commit
8a6aeb0657
|
|
@ -1,7 +1,7 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import './js'
|
import './js'
|
||||||
import * as emitter from './js/event'
|
import * as emitter from './js/event'
|
||||||
import routes from './views/route'
|
import routes from './route'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
|
|
||||||
95
resources/assets/src/route.ts
Normal file
95
resources/assets/src/route.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
module: [() => import('./stylus/home.styl')],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'user',
|
||||||
|
component: () => import('./views/user/Dashboard.vue'),
|
||||||
|
el: '#usage-box',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'user/closet',
|
||||||
|
component: () => import('./views/user/Closet.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'user/player',
|
||||||
|
component: () => import('./views/user/Players.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'user/profile',
|
||||||
|
component: () => import('./views/user/Profile.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin',
|
||||||
|
module: [() => import('./views/admin/Dashboard')],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin/users',
|
||||||
|
component: () => import('./views/admin/Users.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin/players',
|
||||||
|
component: () => import('./views/admin/Players.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin/customize',
|
||||||
|
component: () => import('./views/admin/Customization.vue'),
|
||||||
|
el: '#change-color',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin/plugins/manage',
|
||||||
|
component: () => import('./views/admin/Plugins.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin/plugins/market',
|
||||||
|
component: () => import('./views/admin/Market.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'admin/update',
|
||||||
|
component: () => import('./views/admin/Update.vue'),
|
||||||
|
el: '#update-button',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'auth/login',
|
||||||
|
component: () => import('./views/auth/Login.vue'),
|
||||||
|
el: 'form',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'auth/register',
|
||||||
|
component: () => import('./views/auth/Register.vue'),
|
||||||
|
el: 'form',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'auth/forgot',
|
||||||
|
component: () => import('./views/auth/Forgot.vue'),
|
||||||
|
el: 'form',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'auth/reset/(\\d+)',
|
||||||
|
component: () => import('./views/auth/Reset.vue'),
|
||||||
|
el: 'form',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'skinlib',
|
||||||
|
component: () => import('./views/skinlib/List.vue'),
|
||||||
|
el: '.content-wrapper',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'skinlib/show/(\\d+)',
|
||||||
|
component: () => import('./views/skinlib/Show.vue'),
|
||||||
|
el: '.content > .row:nth-child(1)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'skinlib/upload',
|
||||||
|
component: () => import('./views/skinlib/Upload.vue'),
|
||||||
|
el: '.content',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
export default [
|
|
||||||
{
|
|
||||||
path: 'user',
|
|
||||||
component: () => import('./user/Dashboard.vue'),
|
|
||||||
el: '#usage-box',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'user/closet',
|
|
||||||
component: () => import('./user/Closet.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'user/player',
|
|
||||||
component: () => import('./user/Players.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'user/profile',
|
|
||||||
component: () => import('./user/Profile.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin',
|
|
||||||
module: [() => import('./admin/Dashboard')],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin/users',
|
|
||||||
component: () => import('./admin/Users.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin/players',
|
|
||||||
component: () => import('./admin/Players.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin/customize',
|
|
||||||
component: () => import('./admin/Customization.vue'),
|
|
||||||
el: '#change-color',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin/plugins/manage',
|
|
||||||
component: () => import('./admin/Plugins.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin/plugins/market',
|
|
||||||
component: () => import('./admin/Market.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'admin/update',
|
|
||||||
component: () => import('./admin/Update.vue'),
|
|
||||||
el: '#update-button',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'auth/login',
|
|
||||||
component: () => import('./auth/Login.vue'),
|
|
||||||
el: 'form',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'auth/register',
|
|
||||||
component: () => import('./auth/Register.vue'),
|
|
||||||
el: 'form',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'auth/forgot',
|
|
||||||
component: () => import('./auth/Forgot.vue'),
|
|
||||||
el: 'form',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'auth/reset/(\\d+)',
|
|
||||||
component: () => import('./auth/Reset.vue'),
|
|
||||||
el: 'form',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'skinlib',
|
|
||||||
component: () => import('./skinlib/List.vue'),
|
|
||||||
el: '.content-wrapper',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'skinlib/show/(\\d+)',
|
|
||||||
component: () => import('./skinlib/Show.vue'),
|
|
||||||
el: '.content > .row:nth-child(1)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'skinlib/upload',
|
|
||||||
component: () => import('./skinlib/Upload.vue'),
|
|
||||||
el: '.content',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
5
resources/assets/tests/vue.d.ts
vendored
5
resources/assets/tests/vue.d.ts
vendored
|
|
@ -1,5 +1,10 @@
|
||||||
|
/* eslint-disable import/export */
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
export default Vue
|
export default Vue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '*.styl' {
|
||||||
|
export default {}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
@include('common.seo-meta-tags')
|
@include('common.seo-meta-tags')
|
||||||
<!-- App Styles -->
|
<!-- App Styles -->
|
||||||
@include('common.dependencies.style', ['module' => 'home'])
|
@include('common.dependencies.style')
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hold-transition {{ option('color_scheme') }} layout-top-nav">
|
<body class="hold-transition {{ option('color_scheme') }} layout-top-nav">
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ const config = {
|
||||||
'sweetalert2/dist/sweetalert2.min.css',
|
'sweetalert2/dist/sweetalert2.min.css',
|
||||||
'./resources/assets/src/stylus/common.styl',
|
'./resources/assets/src/stylus/common.styl',
|
||||||
],
|
],
|
||||||
home: './resources/assets/src/stylus/home.styl',
|
|
||||||
setup: './resources/assets/src/stylus/setup.styl',
|
setup: './resources/assets/src/stylus/setup.styl',
|
||||||
'langs/en': './resources/lang/en/front-end.js',
|
'langs/en': './resources/lang/en/front-end.js',
|
||||||
'langs/zh_CN': './resources/lang/zh_CN/front-end.js',
|
'langs/zh_CN': './resources/lang/zh_CN/front-end.js',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user