From 233edc94956beb309319dcd2839ec0b27ee1fc8f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 25 Jul 2022 21:21:40 -0700 Subject: [PATCH] hide federation from public local instance info if not mod --- package.json | 2 +- packages/client/src/pages/about.vue | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index dde83503d..4e1f12b1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.118.0-calc.3.b4", + "version": "12.118.0-calc.4.b4", "codename": "indigo", "repository": { "type": "git", diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index 07f01a20a..0a067d7b7 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -94,6 +94,7 @@ import * as os from '@/os'; import number from '@/filters/number'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; +import { iAmModerator } from '@/account'; const props = withDefaults(defineProps<{ initialTab?: string; @@ -111,22 +112,30 @@ const initStats = () => os.api('stats', { const headerActions = $computed(() => []); -const headerTabs = $computed(() => [{ +let theTabs = [{ key: 'overview', title: i18n.ts.overview, }, { key: 'emojis', title: i18n.ts.customEmojis, icon: 'fas fa-laugh', -}, { - key: 'federation', - title: i18n.ts.federation, - icon: 'fas fa-globe', }, { key: 'charts', title: i18n.ts.charts, icon: 'fas fa-chart-simple', -}]); +}]; + +if (iAmModerator) { + theTabs.push( + { + key: 'federation', + title: i18n.ts.federation, + icon: 'fas fa-globe', + }, + ); +} + +let headerTabs = $computed(() => theTabs); definePageMetadata(computed(() => ({ title: i18n.ts.instanceInfo,