Move mode toggle to TopNav, view toggle to map right
All checks were successful
Build Docker Image / build (push) Successful in 3m32s
All checks were successful
Build Docker Image / build (push) Successful in 3m32s
- Add [Explore/Quote] mode toggle to MainNavigation.vue (TopNav) - Remove mode toggle from CatalogPage.vue (now in header) - Move [Offers/Hubs/Suppliers] view toggle from top-left to top-right on map - View toggle now visible in both modes (Explore and Quote) - Simplify mobile layout to show only view toggle
This commit is contained in:
@@ -28,30 +28,8 @@
|
||||
</ClientOnly>
|
||||
</div>
|
||||
|
||||
<!-- Mode tabs (top RIGHT overlay) -->
|
||||
<!-- View toggle (top RIGHT overlay) - works in both modes -->
|
||||
<div class="absolute top-4 right-4 z-20 hidden lg:block">
|
||||
<div class="tabs tabs-boxed bg-white/95 backdrop-blur shadow-lg">
|
||||
<button
|
||||
class="tab"
|
||||
:class="{ 'tab-active': catalogMode === 'explore' }"
|
||||
@click="setCatalogMode('explore')"
|
||||
>
|
||||
<Icon name="lucide:compass" size="16" class="mr-1" />
|
||||
{{ $t('catalog.modes.explore') }}
|
||||
</button>
|
||||
<button
|
||||
class="tab"
|
||||
:class="{ 'tab-active': catalogMode === 'quote' }"
|
||||
@click="setCatalogMode('quote')"
|
||||
>
|
||||
<Icon name="lucide:search" size="16" class="mr-1" />
|
||||
{{ $t('catalog.modes.quote') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- View toggle (top LEFT overlay) - for Explore mode -->
|
||||
<div v-if="catalogMode === 'explore'" class="absolute top-4 left-4 z-20 hidden lg:block">
|
||||
<div class="join bg-white/95 backdrop-blur shadow-lg rounded-lg">
|
||||
<button
|
||||
class="btn btn-sm join-item"
|
||||
@@ -81,7 +59,6 @@
|
||||
<div
|
||||
v-if="showPanel"
|
||||
class="absolute top-4 left-4 bottom-4 z-10 w-96 max-w-[calc(100vw-2rem)] hidden lg:block"
|
||||
:class="catalogMode === 'explore' ? 'top-16' : 'top-4'"
|
||||
>
|
||||
<div class="bg-white/95 backdrop-blur rounded-xl shadow-lg p-4 h-full overflow-hidden flex flex-col">
|
||||
<slot name="panel" />
|
||||
@@ -90,10 +67,9 @@
|
||||
|
||||
<!-- Mobile bottom sheet -->
|
||||
<div class="lg:hidden absolute bottom-0 left-0 right-0 z-20">
|
||||
<!-- Mobile toggles -->
|
||||
<div class="flex justify-between items-center px-4 mb-2">
|
||||
<!-- View toggle (Explore mode only) -->
|
||||
<div v-if="catalogMode === 'explore'" class="join bg-white/95 backdrop-blur shadow-lg rounded-lg">
|
||||
<!-- Mobile view toggle -->
|
||||
<div class="flex justify-end px-4 mb-2">
|
||||
<div class="join bg-white/95 backdrop-blur shadow-lg rounded-lg">
|
||||
<button
|
||||
class="btn btn-xs join-item"
|
||||
:class="{ 'btn-active': mapViewMode === 'offers' }"
|
||||
@@ -116,25 +92,6 @@
|
||||
{{ $t('catalog.views.suppliers') }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else />
|
||||
|
||||
<!-- Mode toggle -->
|
||||
<div class="tabs tabs-boxed bg-white/95 backdrop-blur shadow-lg tabs-sm">
|
||||
<button
|
||||
class="tab tab-sm"
|
||||
:class="{ 'tab-active': catalogMode === 'explore' }"
|
||||
@click="setCatalogMode('explore')"
|
||||
>
|
||||
{{ $t('catalog.modes.explore') }}
|
||||
</button>
|
||||
<button
|
||||
class="tab tab-sm"
|
||||
:class="{ 'tab-active': catalogMode === 'quote' }"
|
||||
@click="setCatalogMode('quote')"
|
||||
>
|
||||
{{ $t('catalog.modes.quote') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile panel (collapsible) - only when showPanel is true -->
|
||||
@@ -162,7 +119,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { MapBounds } from '~/components/catalog/CatalogMap.vue'
|
||||
|
||||
const { mapViewMode, setMapViewMode, catalogMode, setCatalogMode } = useCatalogSearch()
|
||||
const { mapViewMode, setMapViewMode } = useCatalogSearch()
|
||||
|
||||
interface MapItem {
|
||||
uuid: string
|
||||
|
||||
Reference in New Issue
Block a user