front end, config
This commit is contained in:
51
client/src/router.js
Normal file
51
client/src/router.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
|
||||
import Settings from './components/Settings'
|
||||
import newEvent from './components/newEvent'
|
||||
import EventDetail from './components/EventDetail'
|
||||
import Login from './components/Login'
|
||||
import Register from './components/Register'
|
||||
import Export from './components/Export'
|
||||
import Admin from './components/Admin'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
routes: [
|
||||
{
|
||||
path: '/admin',
|
||||
components: { modal: Admin }
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
components: { modal: Register }
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
components: { modal: Login }
|
||||
},
|
||||
{
|
||||
path: '/new_event',
|
||||
components: { modal: newEvent }
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
components: { modal: Settings }
|
||||
},
|
||||
{
|
||||
path: '/event/:id',
|
||||
components: { modal: EventDetail }
|
||||
},
|
||||
{
|
||||
path: '/edit/:id',
|
||||
components: { modal: newEvent },
|
||||
props: { edit: true }
|
||||
},
|
||||
{
|
||||
path: '/export/:type',
|
||||
components: { modal: Export }
|
||||
}
|
||||
]
|
||||
})
|
||||
Reference in New Issue
Block a user