From: Eugen Rochko Date: Thu, 22 Dec 2016 22:03:57 +0000 (+0100) Subject: Follow call on locked account creates follow request instead X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=b891a81008d2cf595cb37432a8e1f36606db16d6;p=mastodon.git Follow call on locked account creates follow request instead Reflect "requested" relationship in API and UI Reflect inability of private posts to be reblogged in the UI Disable Webfinger for locked accounts --- diff --git a/app/assets/javascripts/components/components/icon_button.jsx b/app/assets/javascripts/components/components/icon_button.jsx index d8f00f5d8..e9a7228e4 100644 --- a/app/assets/javascripts/components/components/icon_button.jsx +++ b/app/assets/javascripts/components/components/icon_button.jsx @@ -5,17 +5,19 @@ const IconButton = React.createClass({ propTypes: { title: React.PropTypes.string.isRequired, icon: React.PropTypes.string.isRequired, - onClick: React.PropTypes.func.isRequired, + onClick: React.PropTypes.func, size: React.PropTypes.number, active: React.PropTypes.bool, style: React.PropTypes.object, - activeStyle: React.PropTypes.object + activeStyle: React.PropTypes.object, + disabled: React.PropTypes.bool }, getDefaultProps () { return { size: 18, - active: false + active: false, + disabled: false }; }, @@ -23,8 +25,10 @@ const IconButton = React.createClass({ handleClick (e) { e.preventDefault(); - this.props.onClick(); - e.stopPropagation(); + + if (!this.props.disabled) { + this.props.onClick(); + } }, render () { @@ -37,7 +41,6 @@ const IconButton = React.createClass({ width: `${this.props.size * 1.28571429}px`, height: `${this.props.size}px`, lineHeight: `${this.props.size}px`, - cursor: 'pointer', ...this.props.style }; @@ -46,7 +49,7 @@ const IconButton = React.createClass({ } return ( -