Merge branch 'suggestions-conditional-admin' into 'develop'
v2 Suggestions: conditionally display admin actions See merge request soapbox-pub/soapbox-fe!893
This commit is contained in:
commit
3622300487
1 changed files with 14 additions and 12 deletions
|
@ -407,18 +407,20 @@ class Header extends ImmutablePureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
if (account.getIn(['pleroma', 'is_suggested'])) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.unsuggestUser, { name: account.get('username') }),
|
||||
action: this.props.onUnsuggestUser,
|
||||
icon: require('@tabler/icons/icons/user-x.svg'),
|
||||
});
|
||||
} else {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.suggestUser, { name: account.get('username') }),
|
||||
action: this.props.onSuggestUser,
|
||||
icon: require('@tabler/icons/icons/user-check.svg'),
|
||||
});
|
||||
if (features.suggestionsV2) {
|
||||
if (account.getIn(['pleroma', 'is_suggested'])) {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.unsuggestUser, { name: account.get('username') }),
|
||||
action: this.props.onUnsuggestUser,
|
||||
icon: require('@tabler/icons/icons/user-x.svg'),
|
||||
});
|
||||
} else {
|
||||
menu.push({
|
||||
text: intl.formatMessage(messages.suggestUser, { name: account.get('username') }),
|
||||
action: this.props.onSuggestUser,
|
||||
icon: require('@tabler/icons/icons/user-check.svg'),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (account.get('id') !== me) {
|
||||
|
|
Loading…
Reference in a new issue