--- /dev/null
+<script setup lang="ts">
+ const { title, isSuccess } = defineProps(["title", "isSuccess"])
+</script>
+
+<template>
+ <span class="tag" :class="{ 'is-success' : isSuccess }" :title="title">
+ <slot />
+ </span>
+</template>
// ASN
asn: number;
+ // AS Name
+ as_name: string | null;
+
+ // Supports IPv6?
+ supports_ipv6: boolean;
+
+ // Supports IPv4?
+ supports_ipv4: boolean;
+
// Last Check Was Successful?
last_check_success: boolean;
<script setup lang="ts">
- import { ref, onMounted } from "vue";
- import type { Mirror } from "@/types/Mirror";
- import { fetchMirrors } from "@/api/mirrors";
+ import { ref, onMounted } from "vue"
+ import type { Mirror } from "@/types/Mirror"
+ import { fetchMirrors } from "@/api/mirrors"
// Import UI components
import Box from "@/components/Box.vue"
import Section from "@/components/Section.vue"
+ import Tags from "@/components/Tags.vue"
+ import Tag from "@/components/Tag.vue"
// Mirrors
const mirrors = ref<Mirror[]>([]);
<Section :title="$t('Mirrors')">
<Box v-for="mirror in mirrors" :key="mirror.hostname"
:title="mirror.hostname" :subtitle="mirror.owner">
- Some content
+ <div class="level">
+ <!-- Show tags of which protocols are supported -->
+ <div class="level-item">
+ <Tags>
+ <Tag v-if="mirror.supports_ipv6" :title="$t('Supports IPv6')" is-success>
+ {{ $t('IPv6') }}
+ </Tag>
+
+ <Tag v-if="mirror.supports_ipv4" :title="$t('Supports IPv4')" is-success>
+ {{ $t('IPv4') }}
+ </Tag>
+ </Tags>
+ </div>
+ </div>
</Box>
</Section>
</template>