Add verified badge top-right on SupplierCard, transport icons on HubCard
Some checks failed
Build Docker Image / build (push) Has been cancelled
Some checks failed
Build Docker Image / build (push) Has been cancelled
This commit is contained in:
@@ -16,8 +16,16 @@
|
||||
]"
|
||||
>
|
||||
<div class="flex flex-col gap-1">
|
||||
<!-- Title -->
|
||||
<Text size="base" weight="semibold" class="truncate">{{ hub.name }}</Text>
|
||||
<!-- Title + Transport icons -->
|
||||
<div class="flex items-center justify-between gap-2">
|
||||
<Text size="base" weight="semibold" class="truncate">{{ hub.name }}</Text>
|
||||
<div v-if="hub.transportTypes?.length" class="flex items-center gap-1 shrink-0">
|
||||
<Icon v-if="hasTransport('auto')" name="lucide:truck" size="14" class="text-base-content/50" />
|
||||
<Icon v-if="hasTransport('rail')" name="lucide:train-front" size="14" class="text-base-content/50" />
|
||||
<Icon v-if="hasTransport('sea')" name="lucide:ship" size="14" class="text-base-content/50" />
|
||||
<Icon v-if="hasTransport('air')" name="lucide:plane" size="14" class="text-base-content/50" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Country left, distance right -->
|
||||
<div class="flex items-center justify-between">
|
||||
<Text tone="muted" size="sm">
|
||||
@@ -41,6 +49,7 @@ interface Hub {
|
||||
country?: string | null
|
||||
countryCode?: string | null
|
||||
distance?: string
|
||||
transportTypes?: string[] | null
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -72,4 +81,6 @@ const countryFlag = computed(() => {
|
||||
}
|
||||
return '🌍'
|
||||
})
|
||||
|
||||
const hasTransport = (type: string) => props.hub.transportTypes?.includes(type)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user