cleanup routes names
This commit is contained in:
+24
-11
@@ -1,8 +1,19 @@
|
||||
import {RouteRecordRaw} from 'vue-router';
|
||||
|
||||
export const routeNames = {
|
||||
home: 'home',
|
||||
callback: 'callback',
|
||||
listRuleBooks: 'list-rule-books',
|
||||
newRuleBook: 'new-rule-book',
|
||||
editRuleBook: 'edit-rule-book',
|
||||
characterRulebook: 'character-rulebook',
|
||||
marketTypes: 'market-types',
|
||||
about: 'about',
|
||||
} as const;
|
||||
|
||||
export const routes: RouteRecordRaw[] = [
|
||||
{path: '/', name: 'home', component: () => import('@/pages/Index.vue')},
|
||||
{path: '/callback', name: 'callback', component: () => import('@/pages/Index.vue')},
|
||||
{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')},
|
||||
@@ -11,17 +22,19 @@ export const routes: RouteRecordRaw[] = [
|
||||
{path: '/rules', component: () => import('@/pages/Rules.vue'), children: [
|
||||
{path: '', redirect: '/rule-books'},
|
||||
{path: '/rule-books', children: [
|
||||
{path: '', name: 'list-rule-books', component: () => import('./pages/rules/ListRuleBooks.vue')},
|
||||
{path: 'new', name: 'new-rule-book', component: () => import('@/pages/rules/EditRuleBook.vue')},
|
||||
{path: ':ruleBookId', name: 'edit-rule-book', component: () => import('@/pages/rules/EditRuleBook.vue')},
|
||||
]},
|
||||
{path: '/characters/rules', component: () => import('./pages/rules/ListCharacterRuleBooks.vue')},
|
||||
{path: '/characters/:characterId/rules', name: 'character-rulebook', component: () => import('@/pages/rules/EditCharacterRuleBook.vue')},
|
||||
{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.characterRulebook, component: () => import('@/pages/rules/EditCharacterRuleBook.vue')},
|
||||
]}
|
||||
]},
|
||||
|
||||
{path: '/market', component: () => import('@/pages/Market.vue'), children: [
|
||||
{path: '', redirect: '/market/types'},
|
||||
{path: 'types/:type?', name: 'market-types', component: () => import('@/pages/market/TypeInfo.vue')},
|
||||
{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')},
|
||||
]},
|
||||
@@ -31,5 +44,5 @@ export const routes: RouteRecordRaw[] = [
|
||||
{path: '/tools', component: () => import('@/pages/Tools.vue')},
|
||||
|
||||
{path: '/characters', component: () => import('@/pages/Characters.vue')},
|
||||
{path: '/about', name: 'about', component: () => import('@/pages/About.vue')},
|
||||
];
|
||||
{path: '/about', name: routeNames.about, component: () => import('@/pages/About.vue')},
|
||||
] as const;
|
||||
Reference in New Issue
Block a user