56 lines
2.9 KiB
TypeScript
56 lines
2.9 KiB
TypeScript
import {RouteRecordRaw} from 'vue-router';
|
|
|
|
declare module 'vue-router' {
|
|
interface RouteMeta {
|
|
public?: boolean;
|
|
}
|
|
}
|
|
|
|
export const routeNames = {
|
|
home: 'home',
|
|
callback: 'callback',
|
|
viewLedger: 'view-ledger',
|
|
viewLedgerBalance: 'view-ledger-balance',
|
|
listLedgerTransactions: 'list-ledger-transactions',
|
|
listLedgerAcquisitions: 'list-ledger-acquisitions',
|
|
viewLedgerStatistics: 'view-ledger-statistics',
|
|
editRuleBook: 'edit-rule-book',
|
|
marketTypes: 'market-types',
|
|
appraise: 'appraise',
|
|
compareAppraisal: 'compare-appraisal',
|
|
about: 'about',
|
|
} as const;
|
|
|
|
export const routes: RouteRecordRaw[] = [
|
|
{path: '/', name: routeNames.home, component: () => import('@/pages/Index.vue'), meta: {public: true}},
|
|
{path: '/callback', name: routeNames.callback, component: () => import('@/pages/Index.vue'), meta: {public: true}},
|
|
|
|
{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: 'acquisitions', name: routeNames.listLedgerAcquisitions, component: () => import('@/pages/ledger/ViewLedgerAcquisitions.vue')},
|
|
{path: 'statistics', name: routeNames.viewLedgerStatistics, component: () => import('@/pages/ledger/ViewLedgerStatistics.vue')},
|
|
]},
|
|
]},
|
|
|
|
{path: '/rules', name: routeNames.editRuleBook, component: () => import('@/pages/rules/EditRuleBook.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: 'scan', component: () => import('@/pages/market/Scan.vue')},
|
|
{path: 'acquisitions', component: () => import('@/pages/market/Acquisitions.vue')},
|
|
{path: 'appraisal', name: routeNames.appraise, component: () => import('@/pages/market/Appraise.vue')},
|
|
{path: 'appraisal/compare', name: routeNames.compareAppraisal, component: () => import('@/pages/market/CompareAppraisal.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'), meta: {public: true}},
|
|
] as const; |