82 lines
1.8 KiB
JavaScript
82 lines
1.8 KiB
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
|
|
//Breaking components into function sections allows webpack to load them dynamically
|
|
//import HomePage from '@/pages/HomePage'
|
|
const HomePage = () => import('@/pages/HomePage')
|
|
|
|
// import LoginPage from '@/pages/LoginPage'
|
|
const LoginPage = () => import('@/pages/LoginPage')
|
|
|
|
// import HelpPage from '@/pages/HelpPage'
|
|
const HelpPage = () => import('@/pages/HelpPage')
|
|
|
|
// import SharePage from '@/pages/SharePage'
|
|
const SharePage = () => import('@/pages/SharePage')
|
|
|
|
//These guys can all be loaded as a chunk
|
|
import NotesPage from '@/pages/NotesPage'
|
|
import QuickPage from '@/pages/QuickPage'
|
|
import AttachmentsPage from '@/pages/AttachmentsPage'
|
|
|
|
Vue.use(Router)
|
|
|
|
export default new Router({
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'HomePage',
|
|
meta: {title:'Home'},
|
|
component: HomePage
|
|
},
|
|
{
|
|
path: '/login',
|
|
name: 'LoginPage',
|
|
meta: {title:'Login'},
|
|
component: LoginPage
|
|
},
|
|
{
|
|
path: '/notes',
|
|
name: 'NotesPage',
|
|
meta: {title:'Notes'},
|
|
component: NotesPage
|
|
},
|
|
{
|
|
path: '/notes/open/:id',
|
|
name: 'NotesPage',
|
|
meta: {title:'Notes'},
|
|
component: NotesPage
|
|
},
|
|
{
|
|
path: '/help',
|
|
name: 'Help',
|
|
meta: {title:'Help'},
|
|
component: HelpPage
|
|
},
|
|
{
|
|
path: '/share/:id',
|
|
name: 'Share',
|
|
meta: {title:'Shared'},
|
|
component: SharePage
|
|
},
|
|
{
|
|
path: '/quick',
|
|
name: 'Quick',
|
|
meta: {title:'Quick'},
|
|
component: QuickPage
|
|
},
|
|
{
|
|
path: '/attachments',
|
|
name: 'Attachments',
|
|
meta: {title:'Attachments'},
|
|
component: AttachmentsPage
|
|
},
|
|
{
|
|
path: '/attachments/note/:id',
|
|
name: 'Attachments',
|
|
meta: {title:'Attachments'},
|
|
component: AttachmentsPage
|
|
},
|
|
]
|
|
})
|