mirror of
https://github.com/jason5ng32/MyIP.git
synced 2026-11-04 08:55:47 +00:00
common/ had become the backend's library: 30 of its 41 modules were imported by nothing in the frontend, so the name no longer said what belonged there. It now holds only what the frontend or the build imports too; backend-only code moved to server/, flat except for datasets/ (the dataset engine and its readers). The *-db/ dataset directories stay in common/: self-hosting docs and Docker volumes mount those paths. frontend/utils/ keeps its app-wide modules at the root and gains ip/ (IP / ASN shaping and validation), report/ (the report pipeline) and features/ (the pure layer of a single feature). Paths only — no logic changes. The Dockerfile copies server/, and the AGENTS.md files say where a new module goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.5 KiB
Vue
38 lines
1.5 KiB
Vue
<!-- Connection quality of an AS (Cloudflare speed-test aggregates): a titled
|
|
two-column grid of whichever of download / upload / latency / jitter the
|
|
Radar ASN summary carries. `info` is that summary (`/api/cfradar?view=asn`);
|
|
renders nothing when no field is present. -->
|
|
<template>
|
|
<div v-if="Object.keys(qualityInfo).length" class="space-y-2 pt-1">
|
|
<div class="flex items-center gap-1.5 text-xs text-muted-foreground">
|
|
<span>{{ t('ipInfos.ASNInfo.connectionQuality') }}</span>
|
|
<JnTooltip :text="t('ipInfos.ASNInfo.connectionQualityTooltip')" side="top"
|
|
class="hidden md:block">
|
|
<CircleQuestionMark class="size-3 cursor-help opacity-70" />
|
|
</JnTooltip>
|
|
</div>
|
|
<dl class="grid grid-cols-2 gap-x-3 gap-y-2 text-sm">
|
|
<div v-for="(item, key) in qualityInfo" :key="key">
|
|
<dt class="text-xs text-muted-foreground mb-0.5">{{ t(`ipInfos.ASNInfo.${key}`) }}</dt>
|
|
<dd class="font-normal wrap-break-word">{{ item }}</dd>
|
|
</div>
|
|
</dl>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { computed } from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { pickConnectionQuality } from '@/utils/ip/asn-metrics.js';
|
|
import { JnTooltip } from '@/components/ui/tooltip';
|
|
import { CircleQuestionMark } from '@lucide/vue';
|
|
|
|
const props = defineProps({
|
|
info: { type: Object, default: null },
|
|
});
|
|
|
|
const { t } = useI18n();
|
|
|
|
const qualityInfo = computed(() => pickConnectionQuality(props.info));
|
|
</script>
|