From 13ed4389c1f093c48721fcdf1439063054ddb359 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 25 Jul 2022 21:21:40 -0700 Subject: [PATCH 1/8] 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 dde83503d9..4e1f12b1c6 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 07f01a20a2..0a067d7b78 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, From 108e8a0637debb3146a27f18d1a95d579a1167ce Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 26 Jul 2022 12:21:12 -0700 Subject: [PATCH 2/8] headerbar --- package.json | 2 +- packages/client/src/pages/timeline.vue | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4e1f12b1c6..2c081d62be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.118.0-calc.4.b4", + "version": "12.118.0-calc.5.b4", "codename": "indigo", "repository": { "type": "git", diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index 5810b745b9..8d23b03bf3 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -133,7 +133,7 @@ const headerTabs = $computed(() => [{ title: i18n.ts._timelines.global, icon: 'fas fa-globe', iconOnly: true, -}] : []), /* { +}] : []), { icon: 'fas fa-list-ul', title: i18n.ts.lists, iconOnly: true, @@ -148,7 +148,7 @@ const headerTabs = $computed(() => [{ title: i18n.ts.channel, iconOnly: true, onClick: chooseChannel, -}*/]); +}]); const headerTabsWhenNotLogin = $computed(() => [ ...(isLocalTimelineAvailable ? [{ @@ -172,6 +172,11 @@ definePageMetadata(computed(() => ({