change label show

This commit is contained in:
Fayyazi
2019-11-16 14:01:55 +03:30
parent ac9eae8b5c
commit b81ec9326f
37 changed files with 3602 additions and 239 deletions
+12 -51
View File
@@ -8,10 +8,8 @@
// Lib imports
import Vue from 'vue'
// import VueAnalytics from 'vue-analytics'
import Router from 'vue-router'
// import Meta from 'vue-meta'
// import { TokenService } from '@/services'
import Meta from 'vue-meta'
// Routes
import paths from './paths'
@@ -32,65 +30,28 @@ function route (options) {
}
Vue.use(Router)
console.log(paths);
// Create a new router
const router = new Router({
mode: 'history',
routes: paths.map(path => route(path)).concat([
{ path: '*', redirect: '/' }
]),
// scrollBehavior (to, from, savedPosition) {
// if (savedPosition) {
// return savedPosition
// }
// if (to.hash) {
// return { selector: to.hash }
// }
// return { x: 0, y: 0 }
// }
})
// Vue.use(Meta)
Vue.use(Meta)
// import {$hasRole} from '@/services/acl/role';
// router.beforeEach((to, from, next) => {
// const isPublic = to.matched.some(record => record.meta.public);
// const onlyWhenLoggedOut = to.matched.some(record => record.meta.onlyWhenLoggedOut);
// const loggedIn = !!TokenService.getToken();
// const roles = (to.meta && to.meta.roles) ? to.meta.roles : null;
//
// if (!isPublic && !loggedIn) {
// return next({
// path:'/login',
// query: {redirect: to.fullPath} // Store the full path to redirect the user to after login
// });
// }
//
// // Do not allow user to visit login page or register page if they are logged in
// if (loggedIn && onlyWhenLoggedOut && policy) {
// return next('/')
// }
//
// // Do not allow user to visit Pages then not access roles
// if (roles && !$hasRole(roles)) {
// return next('/')
// }
//
// next();
// });
router.beforeEach((to, from, next) => {
const isPublic = to.matched.some(record => record.meta.public);
const onlyWhenLoggedOut = to.matched.some(record => record.meta.onlyWhenLoggedOut);
const roles = (to.meta && to.meta.roles) ? to.meta.roles : null;
// Do not allow user to visit Pages then not access roles
next();
});
// Bootstrap Analytics
// Set in .env
// https://github.com/MatteoGabriele/vue-analytics
// if (process.env.GOOGLE_ANALYTICS) {
// Vue.use(VueAnalytics, {
// id: process.env.GOOGLE_ANALYTICS,
// router,
// autoTracking: {
// page: process.env.NODE_ENV !== 'development'
// }
// })
// }
export default router
+5
View File
@@ -15,4 +15,9 @@ export default [
name: 'ShowPackage',
view: 'Package/ShowPackage'
},
{
path: '/Show/Cycle/:cycle',
name: 'ShowCycle',
view: 'Cycle/ShowCycle'
},
]