Merge branch 'remove-endorse-button' into 'develop'

remove endorse button from the profile header menu and some related funcs, fixes #328

Closes #328

See merge request soapbox-pub/soapbox-fe!174
This commit is contained in:
Alex Gleason 2020-08-16 15:53:10 +00:00
commit fb16afb8f7
3 changed files with 13 additions and 13 deletions

View File

@ -132,7 +132,7 @@ class Header extends ImmutablePureComponent {
} }
menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList }); menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList });
menu.push({ text: intl.formatMessage(account.getIn(['relationship', 'endorsed']) ? messages.unendorse : messages.endorse), action: this.props.onEndorseToggle }); // menu.push({ text: intl.formatMessage(account.getIn(['relationship', 'endorsed']) ? messages.unendorse : messages.endorse), action: this.props.onEndorseToggle });
menu.push(null); menu.push(null);
} else if (version.software === 'Pleroma') { } else if (version.software === 'Pleroma') {
menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList }); menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList });

View File

@ -72,9 +72,9 @@ export default class Header extends ImmutablePureComponent {
this.props.onUnblockDomain(domain); this.props.onUnblockDomain(domain);
} }
handleEndorseToggle = () => { // handleEndorseToggle = () => {
this.props.onEndorseToggle(this.props.account); // this.props.onEndorseToggle(this.props.account);
} // }
handleAddToList = () => { handleAddToList = () => {
this.props.onAddToList(this.props.account); this.props.onAddToList(this.props.account);

View File

@ -8,8 +8,8 @@ import {
blockAccount, blockAccount,
unblockAccount, unblockAccount,
unmuteAccount, unmuteAccount,
pinAccount, // pinAccount,
unpinAccount, // unpinAccount,
} from '../../../actions/accounts'; } from '../../../actions/accounts';
import { import {
mentionCompose, mentionCompose,
@ -95,13 +95,13 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
} }
}, },
onEndorseToggle(account) { // onEndorseToggle(account) {
if (account.getIn(['relationship', 'endorsed'])) { // if (account.getIn(['relationship', 'endorsed'])) {
dispatch(unpinAccount(account.get('id'))); // dispatch(unpinAccount(account.get('id')));
} else { // } else {
dispatch(pinAccount(account.get('id'))); // dispatch(pinAccount(account.get('id')));
} // }
}, // },
onReport(account) { onReport(account) {
dispatch(initReport(account)); dispatch(initReport(account));