From 2de0dbdf01ab6bfbf49781bda0eab72d1a3411f5 Mon Sep 17 00:00:00 2001 From: KMY Date: Mon, 16 Oct 2023 17:00:57 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E6=A6=82=E8=A6=81=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AE=E7=99=BA=E7=94=9F?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/features/about/index.jsx | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/app/javascript/mastodon/features/about/index.jsx b/app/javascript/mastodon/features/about/index.jsx index 85d9ca183be082..b58c438e3652ac 100644 --- a/app/javascript/mastodon/features/about/index.jsx +++ b/app/javascript/mastodon/features/about/index.jsx @@ -127,9 +127,10 @@ class About extends PureComponent { const { multiColumn, intl, server, extendedDescription, domainBlocks } = this.props; const isLoading = server.get('isLoading'); - const fedibirdCapabilities = server.get('fedibird_capabilities'); + const fedibirdCapabilities = server.get('fedibird_capabilities') || []; const isPublicUnlistedVisibility = fedibirdCapabilities.includes('kmyblue_visibility_public_unlisted'); const isEmojiReaction = fedibirdCapabilities.includes('emoji_reaction'); + const capabilitiesError = !server.get('fedibird_capabilities'); return ( @@ -192,16 +193,22 @@ class About extends PureComponent {
-

- {!isLoading && ( -
    -
  1. - {intl.formatMessage(messages.emojiReaction)}: {intl.formatMessage(isEmojiReaction ? messages.enabled : messages.disabled)} -
  2. -
  3. - {intl.formatMessage(messages.publicUnlistedVisibility)}: {intl.formatMessage(isPublicUnlistedVisibility ? messages.enabled : messages.disabled)} -
  4. -
+ {capabilitiesError ? ( +

+ ) : ( + <> +

+ {!isLoading && ( +
    +
  1. + {intl.formatMessage(messages.emojiReaction)}: {intl.formatMessage(isEmojiReaction ? messages.enabled : messages.disabled)} +
  2. +
  3. + {intl.formatMessage(messages.publicUnlistedVisibility)}: {intl.formatMessage(isPublicUnlistedVisibility ? messages.enabled : messages.disabled)} +
  4. +
+ )} + )}