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
loading-indicator-on-tls
Alex Gleason 2020-08-16 15:53:10 +00:00
commit fb16afb8f7
3 zmienionych plików z 13 dodań i 13 usunięć

Wyświetl plik

@ -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(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);
} else if (version.software === 'Pleroma') {
menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList });

Wyświetl plik

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

Wyświetl plik

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