Move filterByBounds to map, show only when panel is open
All checks were successful
Build Docker Image / build (push) Successful in 3m46s
All checks were successful
Build Docker Image / build (push) Successful in 3m46s
This commit is contained in:
@@ -12,17 +12,8 @@
|
|||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="searchPlaceholder"
|
:placeholder="searchPlaceholder"
|
||||||
class="input input-sm w-full bg-white/10 border-white/20 text-white placeholder:text-white/50 mb-2"
|
class="input input-sm w-full bg-white/10 border-white/20 text-white placeholder:text-white/50"
|
||||||
/>
|
/>
|
||||||
<label class="flex items-center gap-2 cursor-pointer text-white/70 text-sm hover:text-white transition-colors">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
:checked="filterByBounds"
|
|
||||||
class="checkbox checkbox-xs checkbox-primary"
|
|
||||||
@change="emit('update:filter-by-bounds', ($event.target as HTMLInputElement).checked)"
|
|
||||||
/>
|
|
||||||
<span>{{ $t('catalog.search.filterByMap') }}</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Content (scrollable) -->
|
<!-- Content (scrollable) -->
|
||||||
@@ -116,13 +107,11 @@ const props = defineProps<{
|
|||||||
loading?: boolean
|
loading?: boolean
|
||||||
loadingMore?: boolean
|
loadingMore?: boolean
|
||||||
hasMore?: boolean
|
hasMore?: boolean
|
||||||
filterByBounds?: boolean
|
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
'select': [type: string, item: Item]
|
'select': [type: string, item: Item]
|
||||||
'close': []
|
'close': []
|
||||||
'update:filter-by-bounds': [value: boolean]
|
|
||||||
'load-more': []
|
'load-more': []
|
||||||
'hover': [uuid: string | null]
|
'hover': [uuid: string | null]
|
||||||
}>()
|
}>()
|
||||||
|
|||||||
@@ -48,6 +48,20 @@
|
|||||||
<span>{{ $t('catalog.list') }}</span>
|
<span>{{ $t('catalog.list') }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<!-- Filter by bounds checkbox (LEFT, next to list button, only when panel is open) -->
|
||||||
|
<label
|
||||||
|
v-if="isPanelOpen"
|
||||||
|
class="absolute top-[116px] left-32 z-20 hidden lg:flex items-center gap-2 bg-black/30 backdrop-blur-md rounded-lg px-3 py-1.5 border border-white/10 cursor-pointer text-white text-sm hover:bg-black/40 transition-colors"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
:checked="filterByBounds"
|
||||||
|
class="checkbox checkbox-xs checkbox-primary"
|
||||||
|
@change="$emit('update:filter-by-bounds', ($event.target as HTMLInputElement).checked)"
|
||||||
|
/>
|
||||||
|
<span>{{ $t('catalog.search.filterByMap') }}</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
<!-- View toggle (top RIGHT overlay, below header) -->
|
<!-- View toggle (top RIGHT overlay, below header) -->
|
||||||
<div class="absolute top-[116px] right-4 z-20 hidden lg:flex items-center gap-2">
|
<div class="absolute top-[116px] right-4 z-20 hidden lg:flex items-center gap-2">
|
||||||
@@ -235,6 +249,7 @@ const props = withDefaults(defineProps<{
|
|||||||
hoveredId?: string
|
hoveredId?: string
|
||||||
items?: MapItem[]
|
items?: MapItem[]
|
||||||
showPanel?: boolean
|
showPanel?: boolean
|
||||||
|
filterByBounds?: boolean
|
||||||
relatedPoints?: Array<{
|
relatedPoints?: Array<{
|
||||||
uuid: string
|
uuid: string
|
||||||
name: string
|
name: string
|
||||||
@@ -250,6 +265,7 @@ const props = withDefaults(defineProps<{
|
|||||||
pointColor: '#f97316',
|
pointColor: '#f97316',
|
||||||
items: () => [],
|
items: () => [],
|
||||||
showPanel: false,
|
showPanel: false,
|
||||||
|
filterByBounds: false,
|
||||||
relatedPoints: () => []
|
relatedPoints: () => []
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -257,6 +273,7 @@ const emit = defineEmits<{
|
|||||||
'select': [item: MapItem]
|
'select': [item: MapItem]
|
||||||
'bounds-change': [bounds: MapBounds]
|
'bounds-change': [bounds: MapBounds]
|
||||||
'update:hoveredId': [uuid: string | undefined]
|
'update:hoveredId': [uuid: string | undefined]
|
||||||
|
'update:filter-by-bounds': [value: boolean]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// Server-side clustering - use computed node type based on view mode
|
// Server-side clustering - use computed node type based on view mode
|
||||||
|
|||||||
@@ -9,9 +9,11 @@
|
|||||||
:items="currentSelectionItems"
|
:items="currentSelectionItems"
|
||||||
:hovered-id="hoveredItemId ?? undefined"
|
:hovered-id="hoveredItemId ?? undefined"
|
||||||
:show-panel="showPanel"
|
:show-panel="showPanel"
|
||||||
|
:filter-by-bounds="filterByBounds"
|
||||||
:related-points="relatedPoints"
|
:related-points="relatedPoints"
|
||||||
@select="onMapSelect"
|
@select="onMapSelect"
|
||||||
@bounds-change="onBoundsChange"
|
@bounds-change="onBoundsChange"
|
||||||
|
@update:filter-by-bounds="filterByBounds = $event"
|
||||||
>
|
>
|
||||||
<!-- Panel slot - shows selection list OR info OR quote results -->
|
<!-- Panel slot - shows selection list OR info OR quote results -->
|
||||||
<template #panel>
|
<template #panel>
|
||||||
@@ -25,12 +27,10 @@
|
|||||||
:loading="selectionLoading"
|
:loading="selectionLoading"
|
||||||
:loading-more="selectionLoadingMore"
|
:loading-more="selectionLoadingMore"
|
||||||
:has-more="selectionHasMore && !filterByBounds"
|
:has-more="selectionHasMore && !filterByBounds"
|
||||||
:filter-by-bounds="filterByBounds"
|
|
||||||
@select="onSelectItem"
|
@select="onSelectItem"
|
||||||
@close="onClosePanel"
|
@close="onClosePanel"
|
||||||
@load-more="onLoadMore"
|
@load-more="onLoadMore"
|
||||||
@hover="onHoverItem"
|
@hover="onHoverItem"
|
||||||
@update:filter-by-bounds="filterByBounds = $event"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Info mode: show detailed info about selected entity -->
|
<!-- Info mode: show detailed info about selected entity -->
|
||||||
|
|||||||
Reference in New Issue
Block a user