(add) serverFinder: npd15

Related to a1c8597821
This commit is contained in:
kakkokari-gtyih 2023-12-13 00:49:00 +09:00
parent 94603bcf57
commit 50f8c5d8a4
3 changed files with 11 additions and 5 deletions

View File

@ -39,6 +39,7 @@
<div class="input-group">
<select id="orderBy" v-model="f_orderBy" class="form-select">
<option value="recomendded">{{ $t('_servers._search.recomendded') }}</option>
<option value="notesPer15Days">{{ $t('_servers._search.notesPer15Days') }}</option>
<option value="notesCount">{{ $t('_servers._search.notesCount') }}</option>
<option value="usersCount">{{ $t('_servers._search.usersCount') }}</option>
</select>
@ -118,8 +119,8 @@ const sortOpen = ref(false);
//
type MiHubSFStorage = {
f_langs: string;
f_orderBy: 'recomendded' | 'notesCount' | 'usersCount';
f_langs: string | null;
f_orderBy: 'recomendded' | 'notesCount' | 'notesPer15Days' | 'usersCount';
f_order: 'asc' | 'desc';
f_registerAcceptance: 'public' | 'inviteOnly' | null;
};
@ -132,7 +133,7 @@ if (process.client) {
const f_query_partial = ref<string>("");
const f_query = ref<string>("");
const f_langs = ref<MiHubSFStorage['f_langs']>(savedSettings?.f_langs ?? locale.value);
const f_langs = ref<MiHubSFStorage['f_langs']>(savedSettings?.f_langs ?? null);
const f_orderBy = ref<MiHubSFStorage['f_orderBy']>(savedSettings?.f_orderBy ?? 'recomendded');
const f_order = ref<MiHubSFStorage['f_order']>(savedSettings?.f_order ?? 'desc');
const f_registerAcceptance = ref<MiHubSFStorage['f_registerAcceptance']>(savedSettings?.f_registerAcceptance || null);
@ -219,6 +220,9 @@ const filteredInstances = computed<InstanceItem[]>(() => {
case 'notesCount':
orderKey = 'stats.originalNotesCount';
break;
case 'notesPer15Days':
orderKey = 'npd15';
break;
case 'usersCount':
orderKey = 'stats.originalUsersCount';
break;

View File

@ -21,7 +21,7 @@ _nav:
_landing:
_hero:
description: "Misskeyはオープンソースの分散型ソーシャルネットワーキングプラットフォームです。"
description: "Misskey(ミスキー)はオープンソースの分散型ソーシャルネットワーキングプラットフォームです。"
gettingStarted: "はじめる"
_keyFeatures:
_open:
@ -105,6 +105,7 @@ _servers:
orderBy: "並び替え"
recomendded: "デフォルト"
notesCount: "ノート数"
notesPer15Days: "1日あたりのート数15日平均"
usersCount: "ユーザー数"
_registerAcceptance:
title: "新規登録"

View File

@ -24,7 +24,8 @@ export type InstanceItem = {
nodeinfo: Record<string, any> | null,
/** result of api/meta */
meta: Misskey.entities.InstanceMetadata | null,
/** Number of Notes per Day (15-day average) */
npd15: number,
stats?: Record<string, any>, // deprecated (result of api/stats)
};