2023-07-08 19:23:27 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-07-09 11:58:53 +02:00
|
|
|
<GHero>
|
|
|
|
<template #title>{{ $t('_servers.title') }}</template>
|
|
|
|
<template #description>
|
|
|
|
{{ $t('_servers.description') }}<br>
|
2023-12-23 17:00:03 +01:00
|
|
|
<I18nT scope="global" keypath="_servers.addYourServer" tag="span">
|
2023-09-23 12:07:45 +02:00
|
|
|
<GNuxtLink class="font-bold hover:underline underline-offset-4" to="https://github.com/joinmisskey/api">{{ $t('_servers.addYourServerLink') }}</GNuxtLink>
|
2023-07-09 11:58:53 +02:00
|
|
|
</I18nT>
|
|
|
|
</template>
|
|
|
|
<template #icon>
|
|
|
|
<div class="relative px-6 py-8">
|
|
|
|
<GDots class="absolute top-0 left-0 w-32 h-32 text-accent-600" />
|
|
|
|
<GDots class="absolute bottom-0 right-0 w-32 h-32 text-accent-600" />
|
2023-12-18 06:11:34 +01:00
|
|
|
<div class="relative bg-white dark:bg-slate-800 shadow-lg rounded-lg w-full lg:w-80 p-6 space-y-4 break-words">
|
2023-07-09 11:58:53 +02:00
|
|
|
<dl>
|
|
|
|
<dt>{{ $t('_servers._statistics.notes') }}</dt>
|
2023-12-18 16:40:40 +01:00
|
|
|
<dd class="font-bold text-accent-600 text-2xl">{{ instancesStats?.notesCount ? $n(instancesStats.notesCount) : $t('loading') }}</dd>
|
2023-07-09 11:58:53 +02:00
|
|
|
</dl>
|
|
|
|
<dl>
|
|
|
|
<dt>{{ $t('_servers._statistics.users') }}</dt>
|
2023-12-18 16:40:40 +01:00
|
|
|
<dd class="font-bold text-accent-600 text-2xl">{{ instancesStats?.usersCount ? $n(instancesStats.usersCount) : $t('loading') }}</dd>
|
2023-07-09 11:58:53 +02:00
|
|
|
</dl>
|
|
|
|
<dl>
|
|
|
|
<dt>{{ $t('_servers._statistics.servers') }}</dt>
|
2023-12-18 16:40:40 +01:00
|
|
|
<dd class="font-bold text-accent-600 text-2xl">{{ instancesStats?.instancesCount ? $n(instancesStats.instancesCount) : $t('loading') }}</dd>
|
2023-07-09 11:58:53 +02:00
|
|
|
</dl>
|
2023-12-18 06:11:34 +01:00
|
|
|
<div class="!mt-2">
|
|
|
|
<GNuxtLink class="hover:underline underline-offset-2" :to="localePath('/servers/stats/')">{{ $t('_servers._statistics.viewFullStats') }}<ArrowRightIco class="ml-1" /></GNuxtLink>
|
|
|
|
</div>
|
2023-07-09 11:58:53 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</GHero>
|
2023-07-15 11:53:53 +02:00
|
|
|
<div class="pb-12 lg:mt-12 pt-6 bg-white dark:bg-slate-950 min-h-screen">
|
2023-07-13 17:25:30 +02:00
|
|
|
<ClientOnly>
|
2024-02-15 13:15:46 +01:00
|
|
|
<Suspense>
|
|
|
|
<ServersFinder @load="setServerStats" />
|
|
|
|
<template #fallback>
|
|
|
|
<div class="container mx-auto max-w-screen-xl p-6">
|
|
|
|
<MkLoading class="mx-auto text-accent-600"></MkLoading>
|
|
|
|
<p class="text-center">{{ $t('loading') }}</p>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</Suspense>
|
2023-07-15 11:53:53 +02:00
|
|
|
<template #fallback>
|
|
|
|
<div class="container mx-auto max-w-screen-xl p-6">
|
2023-10-29 14:18:36 +01:00
|
|
|
<MkLoading class="mx-auto text-accent-600"></MkLoading>
|
2023-07-15 11:53:53 +02:00
|
|
|
<p class="text-center">{{ $t('loading') }}</p>
|
|
|
|
</div>
|
|
|
|
</template>
|
2023-07-13 17:25:30 +02:00
|
|
|
</ClientOnly>
|
2023-07-09 11:58:53 +02:00
|
|
|
</div>
|
2023-07-08 19:23:27 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2023-12-03 05:00:52 +01:00
|
|
|
import type { InstancesStatsObj } from '@/types/instances-info';
|
2023-12-18 06:11:34 +01:00
|
|
|
import ArrowRightIco from "bi/arrow-right.svg";
|
2023-12-03 05:00:52 +01:00
|
|
|
|
2023-07-09 11:58:53 +02:00
|
|
|
const { t, locale } = useI18n();
|
2023-12-22 15:53:24 +01:00
|
|
|
const localePath = useGLocalePath();
|
2023-07-09 11:58:53 +02:00
|
|
|
const route = useRoute();
|
|
|
|
|
2023-07-13 17:25:30 +02:00
|
|
|
const instancesStats = ref<InstancesStatsObj>();
|
2023-07-09 20:09:50 +02:00
|
|
|
|
2024-02-02 02:39:09 +01:00
|
|
|
function setServerStats(val?: InstancesStatsObj) {
|
2023-07-13 17:25:30 +02:00
|
|
|
instancesStats.value = val;
|
|
|
|
}
|
2023-07-09 20:09:50 +02:00
|
|
|
|
2023-07-09 11:58:53 +02:00
|
|
|
route.meta.title = t('_servers.title');
|
2023-12-03 05:00:52 +01:00
|
|
|
route.meta.description = t('_servers.description');
|
2023-12-20 11:39:08 +01:00
|
|
|
route.meta.scrollButton = {
|
|
|
|
customPosition: {
|
|
|
|
y: '4.5rem',
|
|
|
|
}
|
|
|
|
};
|
2023-07-08 19:23:27 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
</style>
|