56 lines
2.9 KiB
TypeScript
56 lines
2.9 KiB
TypeScript
import {RouteRecordRaw} from 'vue-router';
|
|
|
|
export const routeNames = {
|
|
home: 'home',
|
|
callback: 'callback',
|
|
viewLedger: 'view-ledger',
|
|
viewLedgerBalance: 'view-ledger-balance',
|
|
listLedgerTransactions: 'list-ledger-transactions',
|
|
listRuleBooks: 'list-rule-books',
|
|
newRuleBook: 'new-rule-book',
|
|
editRuleBook: 'edit-rule-book',
|
|
editCharacterRulebook: 'edit-character-rule-book',
|
|
marketTypes: 'market-types',
|
|
about: 'about',
|
|
} as const;
|
|
|
|
export const routes: RouteRecordRaw[] = [
|
|
{path: '/', name: routeNames.home, component: () => import('@/pages/Index.vue')},
|
|
{path: '/callback', name: routeNames.callback, component: () => import('@/pages/Index.vue')},
|
|
|
|
{path: '/ledgers', component: () => import('@/pages/Ledgers.vue'), children: [
|
|
{path: '', component: () => import('@/pages/ledger/ListLedgers.vue')},
|
|
{path: ':ledgerId', component: () => import('./pages/ledger/ViewLedger.vue'), children: [
|
|
{path: '', name: routeNames.viewLedger, redirect: {name: routeNames.viewLedgerBalance}},
|
|
{path: 'balance', name: routeNames.viewLedgerBalance, component: () => import('@/pages/ledger/ViewLedgerBalance.vue')},
|
|
{path: 'transactions', name: routeNames.listLedgerTransactions, component: () => import('@/pages/ledger/ListLedgerTransactions.vue')},
|
|
]},
|
|
]},
|
|
|
|
{path: '/rules', component: () => import('@/pages/Rules.vue'), children: [
|
|
{path: '', redirect: {name: routeNames.listRuleBooks}},
|
|
{path: '/rule-books', children: [
|
|
{path: '', name: routeNames.listRuleBooks, component: () => import('@/pages/rules/ListRuleBooks.vue')},
|
|
{path: 'new', name: routeNames.newRuleBook, component: () => import('@/pages/rules/EditRuleBook.vue')},
|
|
{path: ':ruleBookId', name: routeNames.editRuleBook, component: () => import('@/pages/rules/EditRuleBook.vue')},
|
|
]},
|
|
{path: '/characters/rules', children: [
|
|
{path: '', component: () => import('@/pages/rules/ListCharacterRuleBooks.vue')},
|
|
{path: '/characters/:characterId/rules', name: routeNames.editCharacterRulebook, component: () => import('@/pages/rules/EditCharacterRuleBook.vue')},
|
|
]}
|
|
]},
|
|
|
|
{path: '/market', component: () => import('@/pages/Market.vue'), children: [
|
|
{path: '', redirect: {name: routeNames.marketTypes}},
|
|
{path: 'types/:type?', name: routeNames.marketTypes, component: () => import('@/pages/market/TypeInfo.vue')},
|
|
{path: 'tracking', component: () => import('@/pages/market/Tracking.vue')},
|
|
{path: 'acquisitions', component: () => import('@/pages/market/Acquisitions.vue')},
|
|
]},
|
|
|
|
{path: '/reprocess', component: () => import('@/pages/Reprocess.vue')},
|
|
|
|
{path: '/tools', component: () => import('@/pages/Tools.vue')},
|
|
|
|
{path: '/characters', component: () => import('@/pages/Characters.vue')},
|
|
{path: '/about', name: routeNames.about, component: () => import('@/pages/About.vue')},
|
|
] as const; |