update component
This commit is contained in:
@@ -29,20 +29,19 @@
|
||||
</div>
|
||||
|
||||
<!-- Локация с флагом -->
|
||||
<div class="flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400">
|
||||
<div class="flex items-center justify-center gap-2 text-xs text-gray-500 dark:text-gray-400">
|
||||
<img
|
||||
v-if="flagUrl"
|
||||
:src="flagUrl"
|
||||
:alt="countryCode"
|
||||
class="w-4 h-3 object-cover rounded-sm"
|
||||
class="w-4 h-3 object-cover align-middle"
|
||||
@error="handleFlagError"
|
||||
/>
|
||||
<span v-if="countryEmoji" class="text-base">{{ countryEmoji }}</span>
|
||||
<span v-if="ipData.location?.city" class="hidden sm:inline">{{ ipData.location.city }}</span>
|
||||
<span v-if="ipData.location?.country" class="text-gray-600 dark:text-gray-300 font-medium">
|
||||
<span v-if="ipData.location?.city" class="hidden sm:inline align-middle">{{ ipData.location.city }}</span>
|
||||
<span v-if="ipData.location?.country" class="text-gray-600 dark:text-gray-300 font-medium align-middle">
|
||||
{{ ipData.location.country }}
|
||||
</span>
|
||||
<span v-if="ipData.asn?.name" class="hidden md:inline text-gray-400">
|
||||
<span v-if="ipData.asn?.name" class="hidden md:inline text-gray-400 align-middle">
|
||||
• {{ truncateText(ipData.asn.name, 30) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -153,11 +152,6 @@ const countryCode = computed(() => {
|
||||
return ipData.value?.location?.computed_country_code || null
|
||||
})
|
||||
|
||||
// Emoji флага из withFlags
|
||||
const countryEmoji = computed(() => {
|
||||
return ipData.value?._flags?.flagEmoji || null
|
||||
})
|
||||
|
||||
// URL флага
|
||||
const flagUrl = computed(() => {
|
||||
// Сначала пробуем взять SVG из withFlags
|
||||
|
||||
Reference in New Issue
Block a user