Fix catalog UI issues
All checks were successful
Build Docker Image / build (push) Successful in 3m31s
All checks were successful
Build Docker Image / build (push) Successful in 3m31s
1. Fix navbar height - prevent tag wrapping with overflow-hidden 2. Fix translation keys for mode labels and search form labels 3. Fix SelectionPanel - white glass header/search, no top gap 4. Map click fills active selector - emit full properties from map
This commit is contained in:
@@ -62,7 +62,7 @@ const props = withDefaults(defineProps<{
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
'select-item': [uuid: string]
|
||||
'select-item': [uuid: string, properties?: Record<string, any>]
|
||||
'bounds-change': [bounds: MapBounds]
|
||||
}>()
|
||||
|
||||
@@ -428,11 +428,12 @@ const initServerClusteringLayers = async (map: MapboxMapType) => {
|
||||
})
|
||||
})
|
||||
|
||||
// Click on individual point
|
||||
// Click on individual point - emit full properties
|
||||
map.on('click', 'server-points', (e) => {
|
||||
const features = map.queryRenderedFeatures(e.point, { layers: ['server-points'] })
|
||||
if (!features.length) return
|
||||
emit('select-item', features[0].properties?.id)
|
||||
const props = features[0].properties || {}
|
||||
emit('select-item', props.id, props)
|
||||
})
|
||||
|
||||
map.on('mouseenter', 'server-clusters', () => { map.getCanvas().style.cursor = 'pointer' })
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
<template>
|
||||
<div class="flex flex-col gap-3">
|
||||
<!-- Header (sticky at top) -->
|
||||
<div class="flex items-center justify-between sticky top-0 bg-base-100/80 backdrop-blur-sm -mx-4 px-4 py-2 -mt-4 z-10">
|
||||
<h3 class="font-semibold text-lg">{{ title }}</h3>
|
||||
<button class="btn btn-ghost btn-sm btn-circle" @click="emit('close')">
|
||||
<Icon name="lucide:x" size="18" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Search input (sticky below header) -->
|
||||
<div class="sticky top-10 bg-base-100/80 backdrop-blur-sm -mx-4 px-4 pb-2 z-10">
|
||||
<div class="flex flex-col h-full">
|
||||
<!-- Header + Search (white glass, sticky) -->
|
||||
<div class="sticky top-0 z-10 -m-4 mb-0 p-3 rounded-t-xl bg-white/90 backdrop-blur-md border-b border-white/20">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<h3 class="font-semibold text-base text-base-content">{{ title }}</h3>
|
||||
<button class="btn btn-ghost btn-xs btn-circle text-base-content/60 hover:text-base-content" @click="emit('close')">
|
||||
<Icon name="lucide:x" size="16" />
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
v-model="searchQuery"
|
||||
type="text"
|
||||
:placeholder="searchPlaceholder"
|
||||
class="input input-bordered input-sm w-full"
|
||||
class="input input-sm w-full bg-white/50 border-base-300/50 text-base-content placeholder:text-base-content/50"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- List -->
|
||||
<div class="-mx-1 px-1">
|
||||
<div class="flex-1 pt-3">
|
||||
<div v-if="loading" class="flex items-center justify-center py-8">
|
||||
<span class="loading loading-spinner loading-md" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user