- New Rule Book
+ New Rule Book
diff --git a/src/routes.ts b/src/routes.ts
index 3d5acc5..20b3bde 100644
--- a/src/routes.ts
+++ b/src/routes.ts
@@ -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')},
-];
\ No newline at end of file
+ {path: '/about', name: routeNames.about, component: () => import('@/pages/About.vue')},
+] as const;
\ No newline at end of file
diff --git a/src/sidebar/Sidebar.vue b/src/sidebar/Sidebar.vue
index d12cced..95b4891 100644
--- a/src/sidebar/Sidebar.vue
+++ b/src/sidebar/Sidebar.vue
@@ -1,6 +1,7 @@