refactor(clientarea): use CatalogPage with #panel slot for orders/addresses
All checks were successful
Build Docker Image / build (push) Successful in 4m21s

- Add panelWidth and hideViewToggle props to CatalogPage
- Update orders page to use CatalogPage with narrow panel (w-50)
- Update addresses page to use CatalogPage with narrow panel (w-50)
- Remove unused ClientAreaMapPage component
This commit is contained in:
Ruslan Bakiev
2026-01-28 09:19:01 +07:00
parent 63e8d47b79
commit 984daa7a84
4 changed files with 205 additions and 425 deletions

View File

@@ -65,8 +65,8 @@
</label>
<!-- View toggle (top RIGHT overlay, below header) - hide in info mode -->
<div v-if="!isInfoMode" class="absolute top-[116px] right-4 z-20 hidden lg:flex items-center gap-2">
<!-- View toggle (top RIGHT overlay, below header) - hide in info mode or when hideViewToggle -->
<div v-if="!isInfoMode && !hideViewToggle" class="absolute top-[116px] right-4 z-20 hidden lg:flex items-center gap-2">
<!-- View mode toggle -->
<div class="flex gap-1 bg-black/30 backdrop-blur-md rounded-lg p-1 border border-white/10">
<button
@@ -106,7 +106,8 @@
<Transition name="slide-left">
<div
v-if="isPanelOpen"
class="absolute top-[116px] left-4 bottom-4 z-30 w-96 max-w-[calc(100vw-2rem)] hidden lg:block"
class="absolute top-[116px] left-4 bottom-4 z-30 max-w-[calc(100vw-2rem)] hidden lg:block"
:class="panelWidth"
>
<div class="bg-black/50 backdrop-blur-md rounded-xl shadow-lg border border-white/10 h-full flex flex-col text-white">
<slot name="panel" />
@@ -127,8 +128,8 @@
<span>{{ $t('catalog.list') }}</span>
</button>
<!-- Mobile view toggle - hide in info mode -->
<div v-if="!isInfoMode" class="flex gap-1 bg-black/30 backdrop-blur-md rounded-lg p-1 border border-white/10">
<!-- Mobile view toggle - hide in info mode or when hideViewToggle -->
<div v-if="!isInfoMode && !hideViewToggle" class="flex gap-1 bg-black/30 backdrop-blur-md rounded-lg p-1 border border-white/10">
<button
class="flex items-center justify-center w-8 h-8 rounded-md transition-colors"
:class="mapViewMode === 'offers' ? 'bg-white/20' : 'hover:bg-white/10'"
@@ -252,6 +253,8 @@ const props = withDefaults(defineProps<{
showPanel?: boolean
filterByBounds?: boolean
infoLoading?: boolean
panelWidth?: string
hideViewToggle?: boolean
relatedPoints?: Array<{
uuid: string
name: string
@@ -269,6 +272,8 @@ const props = withDefaults(defineProps<{
showPanel: false,
filterByBounds: false,
infoLoading: false,
panelWidth: 'w-96',
hideViewToggle: false,
relatedPoints: () => []
})