sforkowany z mirror/soapbox
Merge branch 'suggestions-conditional-admin' into 'develop'
v2 Suggestions: conditionally display admin actions See merge request soapbox-pub/soapbox-fe!893password-reset
commit
3622300487
|
@ -407,18 +407,20 @@ class Header extends ImmutablePureComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account.getIn(['pleroma', 'is_suggested'])) {
|
if (features.suggestionsV2) {
|
||||||
menu.push({
|
if (account.getIn(['pleroma', 'is_suggested'])) {
|
||||||
text: intl.formatMessage(messages.unsuggestUser, { name: account.get('username') }),
|
menu.push({
|
||||||
action: this.props.onUnsuggestUser,
|
text: intl.formatMessage(messages.unsuggestUser, { name: account.get('username') }),
|
||||||
icon: require('@tabler/icons/icons/user-x.svg'),
|
action: this.props.onUnsuggestUser,
|
||||||
});
|
icon: require('@tabler/icons/icons/user-x.svg'),
|
||||||
} else {
|
});
|
||||||
menu.push({
|
} else {
|
||||||
text: intl.formatMessage(messages.suggestUser, { name: account.get('username') }),
|
menu.push({
|
||||||
action: this.props.onSuggestUser,
|
text: intl.formatMessage(messages.suggestUser, { name: account.get('username') }),
|
||||||
icon: require('@tabler/icons/icons/user-check.svg'),
|
action: this.props.onSuggestUser,
|
||||||
});
|
icon: require('@tabler/icons/icons/user-check.svg'),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (account.get('id') !== me) {
|
if (account.get('id') !== me) {
|
||||||
|
|
Ładowanie…
Reference in New Issue