File: //opt/code/src/routes.js
import Router from 'vue-router'
import badRoute from './pages/BadRoute'
import spreadsheet from './pages/Distillate'
import gasoline from './pages/Gasoline'
import users from './pages/Users'
import login from './pages/Login'
import report from './pages/Reports'
export default new Router({
base: '/',
mode: 'hash',
routes:
[
{
path: '/',
redirect: '/distillate'
},
{
path: '/distillate',
component: spreadsheet,
meta:
{
title: 'Distillate Balance',
}
},
{
path: '/gasoline',
component: gasoline,
meta:
{
title: 'Distillate Balance',
}
},
{
path: '/admin',
component: users,
meta:
{
title: 'User accounts',
}
},
{
path: '/login',
component: login,
meta:
{
title: 'LOGIN',
}
},
{
path: '/report',
component: report,
meta:
{
title: 'Reports',
}
},
{
path: '*', // should be last, otherwise matches everything
component: badRoute,
meta:
{
title: 'NOT FOUND'
}
}
]
})