Merge dev into main: версия 0.6.0 с компонентом IpSecurity, флагами и улучшениями #3

Merged
austnv merged 8 commits from dev into main 2026-06-14 21:31:47 +03:00
Showing only changes of commit 8f8eeb958c - Show all commits
+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