update component

This commit is contained in:
austnv
2026-06-14 20:24:42 +03:00
parent b3fd3219d7
commit 8f8eeb958c
+5 -11
View File
@@ -29,20 +29,19 @@
</div> </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 <img
v-if="flagUrl" v-if="flagUrl"
:src="flagUrl" :src="flagUrl"
:alt="countryCode" :alt="countryCode"
class="w-4 h-3 object-cover rounded-sm" class="w-4 h-3 object-cover align-middle"
@error="handleFlagError" @error="handleFlagError"
/> />
<span v-if="countryEmoji" class="text-base">{{ countryEmoji }}</span> <span v-if="ipData.location?.city" class="hidden sm:inline align-middle">{{ ipData.location.city }}</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 align-middle">
<span v-if="ipData.location?.country" class="text-gray-600 dark:text-gray-300 font-medium">
{{ ipData.location.country }} {{ ipData.location.country }}
</span> </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) }} {{ truncateText(ipData.asn.name, 30) }}
</span> </span>
</div> </div>
@@ -153,11 +152,6 @@ const countryCode = computed(() => {
return ipData.value?.location?.computed_country_code || null return ipData.value?.location?.computed_country_code || null
}) })
// Emoji флага из withFlags
const countryEmoji = computed(() => {
return ipData.value?._flags?.flagEmoji || null
})
// URL флага // URL флага
const flagUrl = computed(() => { const flagUrl = computed(() => {
// Сначала пробуем взять SVG из withFlags // Сначала пробуем взять SVG из withFlags