From 0ff1d62c7a5f6b62799a028364b819a5b0686af1 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 29 Sep 2022 04:39:33 +0200 Subject: [Glitch] Add logged-out access to the web UI Port part of 43b5d5e38d2b8ad8f1d1ad0911c3c1718159c912 to glitch-soc Signed-off-by: Claire --- .../glitch/features/ui/components/link_footer.js | 48 ++++++++++++++++++---- 1 file changed, 39 insertions(+), 9 deletions(-) (limited to 'app/javascript/flavours/glitch/features/ui/components/link_footer.js') diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index 67fa067f9..bb8f89e0f 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -48,18 +48,48 @@ class LinkFooter extends React.PureComponent { } render () { + const { signedIn, permissions } = this.context.identity; + + const items = []; + + if ((this.context.identity.permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS) { + items.push(); + } + + if (signedIn && securityLink) { + items.push(); + } + + if (!limitedFederationMode) { + items.push(); + } + + if (profileDirectory) { + items.push(); + } + + items.push(); + + if (privacyPolicyLink) { + items.push(); + } + + if (signedIn) { + items.push(); + } + + items.push(); + + if (signedIn) { + items.push(); + } + return (
    - {((this.context.identity.permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS) &&
  • ·
  • } - {!!securityLink &&
  • ·
  • } - {!limitedFederationMode &&
  • ·
  • } - {profileDirectory &&
  • ·
  • } -
  • ·
  • -
  • ·
  • -
  • ·
  • -
  • ·
  • -
  • + {items.map((item, index, array) => ( +
  • {item} { index === array.length - 1 ? null : ' · ' }
  • + ))}

-- cgit