diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js
index 0af0935e6c..88c578b59c 100644
--- a/app/javascript/flavours/glitch/features/account/components/header.js
+++ b/app/javascript/flavours/glitch/features/account/components/header.js
@@ -134,6 +134,8 @@ class Header extends ImmutablePureComponent {
const accountNote = account.getIn(['relationship', 'note']);
+ const suspended = account.get('suspended');
+
let info = [];
let actionBtn = '';
let lockedIcon = '';
@@ -170,17 +172,21 @@ class Header extends ImmutablePureComponent {
actionBtn = '';
}
+ if (suspended && !account.getIn(['relationship', 'following'])) {
+ actionBtn = '';
+ }
+
if (account.get('locked')) {
lockedIcon = ;
}
- if (account.get('id') !== me) {
+ if (account.get('id') !== me && !suspended) {
menu.push({ text: intl.formatMessage(messages.mention, { name: account.get('username') }), action: this.props.onMention });
menu.push({ text: intl.formatMessage(messages.direct, { name: account.get('username') }), action: this.props.onDirect });
menu.push(null);
}
- if ('share' in navigator) {
+ if ('share' in navigator && !suspended) {
menu.push({ text: intl.formatMessage(messages.share, { name: account.get('username') }), action: this.handleShare });
menu.push(null);
}
@@ -297,39 +303,41 @@ class Header extends ImmutablePureComponent {
-
-
- {attachments.map((attachment, index) => attachment === null ? (
-
0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} />
- ) : (
-
- ))}
+ {suspended ? (
+
+
+
+ ) : (
+
+ {attachments.map((attachment, index) => attachment === null ? (
+ 0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} />
+ ) : (
+
+ ))}
- {loadOlder}
-
+ {loadOlder}
+
+ )}
{isLoading && attachments.size === 0 && (
diff --git a/app/javascript/flavours/glitch/features/account_timeline/index.js b/app/javascript/flavours/glitch/features/account_timeline/index.js
index 5558ba2a30..c56cc9b8e0 100644
--- a/app/javascript/flavours/glitch/features/account_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/account_timeline/index.js
@@ -17,6 +17,8 @@ import { fetchAccountIdentityProofs } from '../../actions/identity_proofs';
import MissingIndicator from 'flavours/glitch/components/missing_indicator';
import TimelineHint from 'flavours/glitch/components/timeline_hint';
+const emptyList = ImmutableList();
+
const mapStateToProps = (state, { params: { accountId }, withReplies = false }) => {
const path = withReplies ? `${accountId}:with_replies` : accountId;
@@ -28,6 +30,7 @@ const mapStateToProps = (state, { params: { accountId }, withReplies = false })
featuredStatusIds: withReplies ? ImmutableList() : state.getIn(['timelines', `account:${accountId}:pinned`, 'items'], ImmutableList()),
isLoading: state.getIn(['timelines', `account:${path}`, 'isLoading']),
hasMore: state.getIn(['timelines', `account:${path}`, 'hasMore']),
+ suspended: state.getIn(['accounts', accountId, 'suspended'], false),
};
};
@@ -51,6 +54,7 @@ class AccountTimeline extends ImmutablePureComponent {
hasMore: PropTypes.bool,
withReplies: PropTypes.bool,
isAccount: PropTypes.bool,
+ suspended: PropTypes.bool,
remote: PropTypes.bool,
remoteUrl: PropTypes.string,
multiColumn: PropTypes.bool,
@@ -91,7 +95,7 @@ class AccountTimeline extends ImmutablePureComponent {
}
render () {
- const { statusIds, featuredStatusIds, isLoading, hasMore, isAccount, multiColumn, remote, remoteUrl } = this.props;
+ const { statusIds, featuredStatusIds, isLoading, hasMore, suspended, isAccount, multiColumn, remote, remoteUrl } = this.props;
if (!isAccount) {
return (
@@ -112,7 +116,9 @@ class AccountTimeline extends ImmutablePureComponent {
let emptyMessage;
- if (remote && statusIds.isEmpty()) {
+ if (suspended) {
+ emptyMessage = ;
+ } else if (remote && statusIds.isEmpty()) {
emptyMessage = ;
} else {
emptyMessage = ;
@@ -129,7 +135,7 @@ class AccountTimeline extends ImmutablePureComponent {
alwaysPrepend
append={remoteMessage}
scrollKey='account_timeline'
- statusIds={statusIds}
+ statusIds={suspended ? emptyList : statusIds}
featuredStatusIds={featuredStatusIds}
isLoading={isLoading}
hasMore={hasMore}