Refactor navigation and fix UI issues
All checks were successful
Build Docker Image / build (push) Successful in 4m13s
All checks were successful
Build Docker Image / build (push) Successful in 4m13s
- Add py-4 to main layout for detail page padding - Show search widget only on main page (not all catalog pages) - Add 4 menu items: Search, Catalog, Orders, Seller - Fix orders page click to navigate to order detail - Update CatalogPage map positioning for new nav structure - Add search translation to cabinetNav i18n files
This commit is contained in:
@@ -171,6 +171,7 @@ const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
const tabs = computed(() => [
|
||||
{ key: 'search', label: t('cabinetNav.search'), path: '/', auth: false },
|
||||
{ key: 'catalog', label: t('cabinetNav.catalog'), path: '/catalog/offers', auth: false },
|
||||
{ key: 'orders', label: t('cabinetNav.orders'), path: '/clientarea/orders', auth: true },
|
||||
{ key: 'seller', label: t('cabinetNav.seller'), path: '/clientarea/offers', auth: true, seller: true },
|
||||
@@ -186,7 +187,8 @@ const visibleTabs = computed(() => {
|
||||
|
||||
const isActiveTab = (key: string) => {
|
||||
const path = route.path
|
||||
if (key === 'catalog') return path.startsWith('/catalog') || path === '/'
|
||||
if (key === 'search') return path === '/' || path === '/en' || path === '/ru'
|
||||
if (key === 'catalog') return path.startsWith('/catalog') || path.includes('/en/catalog') || path.includes('/ru/catalog')
|
||||
if (key === 'orders') return path.includes('/clientarea/orders') || path.includes('/clientarea/addresses') || path.includes('/clientarea/billing')
|
||||
if (key === 'seller') return path.includes('/clientarea/offers')
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user