import ArticleView from '@@/article/ArticleView';
import AuthLogin from '@@/auth/AuthLogin';
import Home from '@@/home';
import Search from '@@/search';
import Dictionary from '@@/dictionary';
import DocumentView from '@@/document';
import UserProfile from '@@/user/Profile';
import UserAppSettings from '@@/user/AppSettings';
import HomeFrontpage from '@@/home/HomeFrontpage';
import HomeRecent from '@@/home/HomeRecent';
import HomeFavorites from '@@/home/HomeFavorites';
import HomeWatchlist from '@@/home/HomeWatchlist';
import NoFound from '@@/404';
export const ROUTE_ARTICLE = 'article';
export const ROUTE_DICTIONARY = 'dictionary';
export const ROUTE_DOCUMENT = 'document';
export const ROUTE_FAVORITES = 'favorites';
export const ROUTE_RECENT = 'recent';
export const ROUTE_HOME = 'home';
export const ROUTE_LOGIN = 'login';
export const ROUTE_SEARCH = 'search';
export const ROUTE_DOCUMENT_HASH_CONTINUITY = '#continuity';
export const ROUTE_DOCUMENT_HASH_ANNOTATION = '#annotation';
export default [
{
path: '/login',
name: ROUTE_LOGIN,
component: AuthLogin
},
{
path: '/search/:link?',
name: ROUTE_SEARCH,
component: Search
},
{
path: '/dictionary/:term?',
name: ROUTE_DICTIONARY,
component: Dictionary
},
{
path: '/document/:id/:view?',
name: ROUTE_DOCUMENT,
component: DocumentView
},
{
path: '/user',
name: 'UserProfile',
component: UserProfile
},
{
path: '/user/app-settings',
name: 'UserAppSettings',
component: UserAppSettings
},
{
path: '/',
component: Home,
children: [
{
path: '',
name: ROUTE_HOME,
component: HomeFrontpage
},
{
path: 'recent',
name: ROUTE_RECENT,
component: HomeRecent
},
{
path: 'favorites',
name: ROUTE_FAVORITES,
component: HomeFavorites
},
{
path: 'watchlist',
name: 'watchlist',
component: HomeWatchlist
}
]
},
{
path: '/article/:section/:id',
name: ROUTE_ARTICLE,
component: ArticleView
},
// 404
{
path: '*',
name: 'NoFound',
component: NoFound
}
];