Files
habitica/website/client/router.js
Matteo Pagliazzi 64754777ed New Client: working navigation (#8131)
* initial work

* new client: working navigation and tasks showing up

* finish header menu and add avatar component

* fix sprites in new client

* initial header version

* initial styling for top menu

* more progress on the header menu

* almost complete menu and avatar

* correctly apply active class for /social and /help

* fix header colors and simplify css

* switch from Roboto to native fonts

* remove small avatar and add viewport

* fixes

* fix user menu with and progress bars

* fix avatar rendeting

* move bars colors to theme

* add site overrides

* fix tests

* shrinkwrap

* fix sprites path

* another try at fixing the sprites path

* another try at fixing the sprites path
2016-11-18 19:20:25 +01:00

46 lines
1.2 KiB
JavaScript

import Vue from 'vue';
import VueRouter from 'vue-router';
import UserTasks from './components/userTasks';
import ParentPage from './components/parentPage';
import Page from './components/page';
Vue.use(VueRouter);
export default new VueRouter({
mode: 'history',
base: process.env.NODE_ENV === 'production' ? '/new-app' : __dirname, // eslint-disable-line no-process-env
routes: [
{ path: '/', component: UserTasks },
{
path: '/inventory',
component: ParentPage,
children: [
{path: '', component: Page},
{path: 'equipment', component: Page},
{path: 'stable', component: Page},
],
},
{ path: '/market', component: Page },
{
path: '/social',
component: ParentPage,
children: [
{path: 'tavern', component: Page},
{path: 'inbox', component: Page},
{path: 'challenges', component: Page},
{path: 'party', component: Page},
{path: 'guilds', component: Page},
],
},
{
path: '/user',
component: ParentPage,
children: [
{path: 'avatar', component: Page},
{path: 'stats', component: Page},
{path: 'achievements', component: Page},
{path: 'settings', component: Page},
],
},
],
});