From 6fb837aa1d34fbafda1fe561d1a3789ac281d27c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 10 May 2022 09:44:35 +0200 Subject: [Glitch] Add `limited` attribute to accounts in REST API and a warning in web UI Port b4d373a3df2752d9f8bdc0d7f02350528f3789b2 to glitch-soc Signed-off-by: Claire --- .../glitch/features/account/components/header.js | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'app/javascript/flavours/glitch/features/account/components') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index a43c20b5f..45aba53f7 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -82,6 +82,7 @@ class Header extends ImmutablePureComponent { onEditAccountNote: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, domain: PropTypes.string.isRequired, + hidden: PropTypes.bool, }; openEditProfile = () => { @@ -115,7 +116,7 @@ class Header extends ImmutablePureComponent { } render () { - const { account, intl, domain } = this.props; + const { account, hidden, intl, domain } = this.props; if (!account) { return null; @@ -270,23 +271,29 @@ class Header extends ImmutablePureComponent { {info} - + {!(suspended || hidden) && }
- +
-
- {actionBtn} - {bellBtn} + {!suspended && ( +
+ {!hidden && ( + + {actionBtn} + {bellBtn} + + )} - -
+ +
+ )}
@@ -298,7 +305,7 @@ class Header extends ImmutablePureComponent { - {!suspended && ( + {!(suspended || hidden) && (
{ fields.size > 0 && ( -- cgit