From 38f33b3354a4275ba642abd7a6350fcf191dd64f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 25 Jul 2022 17:14:37 -0700 Subject: [PATCH] Raw instance info only for moderators --- CALCKEY.md | 1 + packages/client/src/pages/about.vue | 2 +- packages/client/src/pages/instance-info.vue | 55 ++++++++++++++------- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/CALCKEY.md b/CALCKEY.md index 33ac8ee5ac..4eb418b20b 100644 --- a/CALCKEY.md +++ b/CALCKEY.md @@ -40,6 +40,7 @@ - Mark as read from notifications widget - Better welcome screen (not logged in) - Ability to turn off "Connection lost" message +- Raw instance info only for moderators - Spinner instead of "Loading..." - SearchX instead of Google - Spacing on group items diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index cd3e51d68a..07f01a20a2 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -155,7 +155,7 @@ definePageMetadata(computed(() => ({ > .name { display: block; padding: 16px; - color: #fff; + color: #e0def4; text-shadow: 0 0 8px #000; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); } diff --git a/packages/client/src/pages/instance-info.vue b/packages/client/src/pages/instance-info.vue index eaa9b2b319..46a089d3f0 100644 --- a/packages/client/src/pages/instance-info.vue +++ b/packages/client/src/pages/instance-info.vue @@ -53,7 +53,7 @@ - + @@ -198,23 +198,42 @@ const headerActions = $computed(() => [{ }, }]); -const headerTabs = $computed(() => [{ - key: 'overview', - title: i18n.ts.overview, - icon: 'fas fa-info-circle', -}, { - key: 'chart', - title: i18n.ts.charts, - icon: 'fas fa-chart-simple', -}, { - key: 'users', - title: i18n.ts.users, - icon: 'fas fa-users', -}, { - key: 'raw', - title: 'Raw', - icon: 'fas fa-code', -}]); +let headerTabs; + +if (iAmModerator) { + headerTabs = $computed(() => [{ + key: 'overview', + title: i18n.ts.overview, + icon: 'fas fa-info-circle', + }, { + key: 'chart', + title: i18n.ts.charts, + icon: 'fas fa-chart-simple', + }, { + key: 'users', + title: i18n.ts.users, + icon: 'fas fa-users', + }, { + key: 'raw', + title: 'Raw', + icon: 'fas fa-code', + }]); +} +else { + headerTabs = $computed(() => [{ + key: 'overview', + title: i18n.ts.overview, + icon: 'fas fa-info-circle', + }, { + key: 'chart', + title: i18n.ts.charts, + icon: 'fas fa-chart-simple', + }, { + key: 'users', + title: i18n.ts.users, + icon: 'fas fa-users', + }]); +} definePageMetadata({ title: props.host,