Add unified MapPanel component for left map panels
All checks were successful
Build Docker Image / build (push) Successful in 3m25s

- Create MapPanel with white glass header, dark content
- Refactor SelectionPanel to use MapPanel
- Refactor QuotePanel to use MapPanel
- Single source of truth for panel styling
This commit is contained in:
Ruslan Bakiev
2026-01-24 11:20:32 +07:00
parent 7c566aeafc
commit 467f099130
3 changed files with 111 additions and 102 deletions

View File

@@ -1,36 +1,35 @@
<template>
<div class="flex flex-col gap-4 h-full">
<!-- Header -->
<div class="flex items-center justify-between flex-shrink-0">
<h3 class="font-semibold text-lg">{{ $t('catalog.headers.offers') }}</h3>
<span class="badge badge-neutral">{{ offers.length }}</span>
<MapPanel>
<template #header>
<div class="flex items-center justify-between">
<h3 class="font-semibold text-base text-base-content">{{ $t('catalog.headers.offers') }}</h3>
<span class="badge badge-neutral">{{ offers.length }}</span>
</div>
</template>
<!-- Content -->
<div v-if="loading" class="flex items-center justify-center py-8">
<span class="loading loading-spinner loading-md" />
</div>
<!-- Results section -->
<div class="flex-1 overflow-y-auto -mx-1 px-1">
<div v-if="loading" class="flex items-center justify-center py-8">
<span class="loading loading-spinner loading-md" />
</div>
<div v-else-if="offers.length === 0" class="text-center py-8 text-white/60">
<Icon name="lucide:search-x" size="32" class="mb-2" />
<p>{{ $t('catalog.empty.noOffers') }}</p>
</div>
<div v-else-if="offers.length === 0" class="text-center py-8 text-base-content/60">
<Icon name="lucide:search-x" size="32" class="mb-2" />
<p>{{ $t('catalog.empty.noOffers') }}</p>
</div>
<div v-else class="flex flex-col gap-3">
<div
v-for="offer in offers"
:key="offer.uuid"
class="cursor-pointer"
@click="emit('select-offer', offer)"
>
<slot name="offer-card" :offer="offer">
<OfferCard :offer="offer" linkable />
</slot>
</div>
<div v-else class="flex flex-col gap-3">
<div
v-for="offer in offers"
:key="offer.uuid"
class="cursor-pointer"
@click="emit('select-offer', offer)"
>
<slot name="offer-card" :offer="offer">
<OfferCard :offer="offer" linkable />
</slot>
</div>
</div>
</div>
</MapPanel>
</template>
<script setup lang="ts">