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 --- .../features/account_timeline/components/header.js | 8 +++-- .../components/limited_account_hint.js | 35 ++++++++++++++++++++++ .../containers/header_container.js | 3 +- .../glitch/features/account_timeline/index.js | 16 +++++++--- 4 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 app/javascript/flavours/glitch/features/account_timeline/components/limited_account_hint.js (limited to 'app/javascript/flavours/glitch/features/account_timeline') diff --git a/app/javascript/flavours/glitch/features/account_timeline/components/header.js b/app/javascript/flavours/glitch/features/account_timeline/components/header.js index eddad17f5..645ff29ea 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/components/header.js +++ b/app/javascript/flavours/glitch/features/account_timeline/components/header.js @@ -25,6 +25,7 @@ export default class Header extends ImmutablePureComponent { onAddToList: PropTypes.func.isRequired, hideTabs: PropTypes.bool, domain: PropTypes.string.isRequired, + hidden: PropTypes.bool, }; static contextTypes = { @@ -92,7 +93,7 @@ export default class Header extends ImmutablePureComponent { } render () { - const { account, hideTabs } = this.props; + const { account, hidden, hideTabs } = this.props; if (account === null) { return null; @@ -100,7 +101,7 @@ export default class Header extends ImmutablePureComponent { return (
- {account.get('moved') && } + {(!hidden && account.get('moved')) && }