From 29892d2a01d902166b762dbfe2d2487169a8d048 Mon Sep 17 00:00:00 2001
From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Thu, 16 Oct 2025 22:45:37 +0900
Subject: enhance:
 リモートユーザーのロールバッジを表示するかどうかをサーバー管理者が設定できるように
 (#16661)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* enhance: リモートユーザーのロールバッジを表示するかどうかをサーバー管理者が設定できるように

* Update Changelog

* build misskey-js with types
---
 packages/frontend/src/pages/admin/performance.vue | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'packages/frontend/src/pages/admin/performance.vue')

diff --git a/packages/frontend/src/pages/admin/performance.vue b/packages/frontend/src/pages/admin/performance.vue
index e3021778e7..c5f3c2d4f0 100644
--- a/packages/frontend/src/pages/admin/performance.vue
+++ b/packages/frontend/src/pages/admin/performance.vue
@@ -53,6 +53,15 @@ SPDX-License-Identifier: AGPL-3.0-only
 					</div>
 				</SearchMarker>
 
+				<SearchMarker>
+					<div class="_panel" style="padding: 16px;">
+						<MkSwitch v-model="showRoleBadgesOfRemoteUsers" @change="onChange_showRoleBadgesOfRemoteUsers">
+							<template #label><SearchLabel>{{ i18n.ts.showRoleBadgesOfRemoteUsers }}</SearchLabel></template>
+							<template #caption>{{ i18n.ts.turnOffToImprovePerformance }}</template>
+						</MkSwitch>
+					</div>
+				</SearchMarker>
+
 				<SearchMarker>
 					<MkFolder :defaultOpen="true">
 						<template #icon><SearchIcon><i class="ti ti-bolt"></i></SearchIcon></template>
@@ -188,6 +197,7 @@ const enableIdenticonGeneration = ref(meta.enableIdenticonGeneration);
 const enableChartsForRemoteUser = ref(meta.enableChartsForRemoteUser);
 const enableStatsForFederatedInstances = ref(meta.enableStatsForFederatedInstances);
 const enableChartsForFederatedInstances = ref(meta.enableChartsForFederatedInstances);
+const showRoleBadgesOfRemoteUsers = ref(meta.showRoleBadgesOfRemoteUsers);
 
 function onChange_enableServerMachineStats(value: boolean) {
 	os.apiWithDialog('admin/update-meta', {
@@ -229,6 +239,14 @@ function onChange_enableChartsForFederatedInstances(value: boolean) {
 	});
 }
 
+function onChange_showRoleBadgesOfRemoteUsers(value: boolean) {
+	os.apiWithDialog('admin/update-meta', {
+		showRoleBadgesOfRemoteUsers: value,
+	}).then(() => {
+		fetchInstance(true);
+	});
+}
+
 const fttForm = useForm({
 	enableFanoutTimeline: meta.enableFanoutTimeline,
 	enableFanoutTimelineDbFallback: meta.enableFanoutTimelineDbFallback,
-- 
cgit v1.2.3-freya

