fix(catalog): restore hover pin actions
All checks were successful
Build Docker Image / build (push) Successful in 4m56s
All checks were successful
Build Docker Image / build (push) Successful in 4m56s
This commit is contained in:
@@ -122,6 +122,13 @@
|
|||||||
selectable
|
selectable
|
||||||
@select="onProductSelect(product)"
|
@select="onProductSelect(product)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'product', product)"
|
||||||
|
aria-label="Pin product"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -189,6 +196,13 @@
|
|||||||
selectable
|
selectable
|
||||||
@select="onSupplierSelect(supplier)"
|
@select="onSupplierSelect(supplier)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'supplier', supplier)"
|
||||||
|
aria-label="Pin supplier"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -227,6 +241,13 @@
|
|||||||
selectable
|
selectable
|
||||||
@select="onHubSelect(hub)"
|
@select="onHubSelect(hub)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'hub', hub)"
|
||||||
|
aria-label="Pin hub"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -252,6 +273,13 @@
|
|||||||
selectable
|
selectable
|
||||||
@select="onHubSelect(hub)"
|
@select="onHubSelect(hub)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'hub', hub)"
|
||||||
|
aria-label="Pin hub"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -298,6 +326,7 @@ const emit = defineEmits<{
|
|||||||
'select-offer': [offer: { uuid: string; productUuid?: string | null }]
|
'select-offer': [offer: { uuid: string; productUuid?: string | null }]
|
||||||
'update:current-tab': [tab: string]
|
'update:current-tab': [tab: string]
|
||||||
'open-kyc': [uuid: string | undefined]
|
'open-kyc': [uuid: string | undefined]
|
||||||
|
'pin': [type: 'product' | 'hub' | 'supplier', item: { uuid?: string | null; name?: string | null }]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|||||||
@@ -37,6 +37,13 @@
|
|||||||
compact
|
compact
|
||||||
@select="onSelect(item)"
|
@select="onSelect(item)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'product', item)"
|
||||||
|
aria-label="Pin product"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,6 +61,13 @@
|
|||||||
selectable
|
selectable
|
||||||
@select="onSelect(item)"
|
@select="onSelect(item)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'hub', item)"
|
||||||
|
aria-label="Pin hub"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -71,6 +85,13 @@
|
|||||||
selectable
|
selectable
|
||||||
@select="onSelect(item)"
|
@select="onSelect(item)"
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity rounded-full bg-white/10 hover:bg-white/20 p-1"
|
||||||
|
@click.stop="emit('pin', 'supplier', item)"
|
||||||
|
aria-label="Pin supplier"
|
||||||
|
>
|
||||||
|
<Icon name="lucide:pin" size="14" class="text-white/80" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -111,6 +132,7 @@ const emit = defineEmits<{
|
|||||||
'close': []
|
'close': []
|
||||||
'load-more': []
|
'load-more': []
|
||||||
'hover': [uuid: string | null]
|
'hover': [uuid: string | null]
|
||||||
|
'pin': [type: 'product' | 'hub' | 'supplier', item: Item]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
:loading-more="selectionLoadingMore"
|
:loading-more="selectionLoadingMore"
|
||||||
:has-more="selectionHasMore && !filterByBounds"
|
:has-more="selectionHasMore && !filterByBounds"
|
||||||
@select="onSelectItem"
|
@select="onSelectItem"
|
||||||
|
@pin="onPinItem"
|
||||||
@close="onClosePanel"
|
@close="onClosePanel"
|
||||||
@load-more="onLoadMore"
|
@load-more="onLoadMore"
|
||||||
@hover="onHoverItem"
|
@hover="onHoverItem"
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
@select-product="onInfoSelectProduct"
|
@select-product="onInfoSelectProduct"
|
||||||
@select-offer="onSelectOffer"
|
@select-offer="onSelectOffer"
|
||||||
@open-kyc="onOpenKyc"
|
@open-kyc="onOpenKyc"
|
||||||
|
@pin="onPinItem"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Quote results: show offers after search -->
|
<!-- Quote results: show offers after search -->
|
||||||
@@ -585,6 +587,12 @@ const onSelectItem = (type: string, item: { uuid?: string | null; name?: string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onPinItem = (type: 'product' | 'hub' | 'supplier', item: { uuid?: string | null; name?: string | null }) => {
|
||||||
|
if (!item.uuid) return
|
||||||
|
const label = item.name || item.uuid.slice(0, 8) + '...'
|
||||||
|
selectItem(type, item.uuid, label)
|
||||||
|
}
|
||||||
|
|
||||||
// Close panel (cancel select mode)
|
// Close panel (cancel select mode)
|
||||||
const onClosePanel = () => {
|
const onClosePanel = () => {
|
||||||
cancelSelect()
|
cancelSelect()
|
||||||
|
|||||||
Reference in New Issue
Block a user