From 564b016f47c4b6e05438cdecd4280f7b4a331807 Mon Sep 17 00:00:00 2001 From: nobswebdev Date: Sun, 6 Sep 2026 16:08:02 +0200 Subject: [PATCH] use explicit nested routes for settings and wallet CMS tabs. --- cms/src/components.d.ts | 3 ++- cms/src/consts/routeNames.ts | 3 ++- cms/src/router/index.ts | 21 ++++++++++++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/cms/src/components.d.ts b/cms/src/components.d.ts index 349adca..f240ca5 100644 --- a/cms/src/components.d.ts +++ b/cms/src/components.d.ts @@ -11,6 +11,7 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + BitcoinWallet: typeof import('./components/wallet/BitcoinWallet.vue')['default'] CmsListPagination: typeof import('./components/CmsListPagination.vue')['default'] CreateOrEditCategoryModal: typeof import('./components/CreateOrEditCategoryModal.vue')['default'] CreateOrEditDiscountCodeModal: typeof import('./components/CreateOrEditDiscountCodeModal.vue')['default'] @@ -56,9 +57,9 @@ declare module 'vue' { MoneroWallet: typeof import('./components/wallet/MoneroWallet.vue')['default'] OrderCartPanel: typeof import('./components/OrderCartPanel.vue')['default'] OrderChatPanel: typeof import('./components/OrderChatPanel.vue')['default'] + OrderInvoicePaymentPanel: typeof import('./components/OrderInvoicePaymentPanel.vue')['default'] OrderLineAutoFulfillmentModal: typeof import('./components/OrderLineAutoFulfillmentModal.vue')['default'] OrderManualShippingQuotePanel: typeof import('./components/OrderManualShippingQuotePanel.vue')['default'] - OrderMoneroPaymentPanel: typeof import('./components/OrderMoneroPaymentPanel.vue')['default'] OrderPaymentPanel: typeof import('./components/OrderPaymentPanel.vue')['default'] OrderSummaryPanel: typeof import('./components/OrderSummaryPanel.vue')['default'] RichTextEditor: typeof import('./components/RichTextEditor.vue')['default'] diff --git a/cms/src/consts/routeNames.ts b/cms/src/consts/routeNames.ts index 128d560..ba183f0 100644 --- a/cms/src/consts/routeNames.ts +++ b/cms/src/consts/routeNames.ts @@ -7,7 +7,8 @@ export const ROUTE_NAMES = { DiscountCodes: 'DiscountCodes', ShopSettings: 'ShopSettings', Notifications: 'Notifications', - Wallet: 'Wallet', + MoneroWallet: 'MoneroWallet', + BitcoinWallet: 'BitcoinWallet', Orders: 'Orders', OrderDetail: 'OrderDetail' } as const; diff --git a/cms/src/router/index.ts b/cms/src/router/index.ts index df42520..173b02d 100644 --- a/cms/src/router/index.ts +++ b/cms/src/router/index.ts @@ -57,9 +57,10 @@ const router = createRouter({ path: '/settings', component: () => import('../views/CmsSettingsLayout.vue'), meta: { requiresAuth: true, title: 'CMS - Settings', activeMenu: '/settings' }, + redirect: { name: ROUTE_NAMES.ShopSettings }, children: [ { - path: '', + path: 'shop', name: ROUTE_NAMES.ShopSettings, component: () => import('../views/CmsShopSettingsView.vue'), meta: { requiresAuth: true, title: 'CMS - Shop settings', activeMenu: '/settings' } @@ -74,9 +75,23 @@ const router = createRouter({ }, { path: '/wallet', - name: ROUTE_NAMES.Wallet, component: () => import('../views/CmsWalletView.vue'), - meta: { requiresAuth: true, title: 'CMS - Wallet' } + meta: { requiresAuth: true, title: 'CMS - Wallet', activeMenu: '/wallet' }, + redirect: { name: ROUTE_NAMES.MoneroWallet }, + children: [ + { + path: 'monero', + name: ROUTE_NAMES.MoneroWallet, + component: () => import('../components/wallet/MoneroWallet.vue'), + meta: { requiresAuth: true, title: 'CMS - Monero wallet', activeMenu: '/wallet' } + }, + { + path: 'bitcoin', + name: ROUTE_NAMES.BitcoinWallet, + component: () => import('../components/wallet/BitcoinWallet.vue'), + meta: { requiresAuth: true, title: 'CMS - Bitcoin wallet', activeMenu: '/wallet' } + } + ] }, { path: '/:pathMatch(.*)*',