forked from treehouse/mastodon
fixes, functioning now
parent
a489e5d5cd
commit
22cdbca82c
|
@ -205,7 +205,7 @@ export default class Status extends ImmutablePureComponent {
|
|||
this.props.onReply(this.props.status, this.context.router.history);
|
||||
}
|
||||
|
||||
handleHotkeyFavourite = e => {
|
||||
handleHotkeyFavourite = (e) => {
|
||||
this.props.onFavourite(this.props.status, e);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,8 +71,8 @@ export default class StatusActionBar extends ImmutablePureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
handleFavouriteClick = () => {
|
||||
this.props.onFavourite(this.props.status);
|
||||
handleFavouriteClick = (e) => {
|
||||
this.props.onFavourite(this.props.status, e);
|
||||
}
|
||||
|
||||
handleReblogClick = (e) => {
|
||||
|
|
|
@ -103,7 +103,7 @@ export default class Status extends ImmutablePureComponent {
|
|||
if (status.get('favourited')) {
|
||||
this.props.dispatch(unfavourite(status));
|
||||
} else {
|
||||
if (e.shiftKey || !favoriteModal) {
|
||||
if (e.shiftKey || !favouriteModal) {
|
||||
this.handleModalFavourite(status);
|
||||
} else {
|
||||
this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite }));
|
||||
|
|
|
@ -10,11 +10,11 @@ import DisplayName from 'flavours/glitch/components/display_name';
|
|||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
const messages = defineMessages({
|
||||
reblog: { id: 'status.favourite', defaultMessage: 'Favourite' },
|
||||
favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
|
||||
});
|
||||
|
||||
@injectIntl
|
||||
export default class BoostModal extends ImmutablePureComponent {
|
||||
export default class FavouriteModal extends ImmutablePureComponent {
|
||||
|
||||
static contextTypes = {
|
||||
router: PropTypes.object,
|
||||
|
@ -22,7 +22,7 @@ export default class BoostModal extends ImmutablePureComponent {
|
|||
|
||||
static propTypes = {
|
||||
status: ImmutablePropTypes.map.isRequired,
|
||||
onReblog: PropTypes.func.isRequired,
|
||||
onFavourite: PropTypes.func.isRequired,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
intl: PropTypes.object.isRequired,
|
||||
};
|
||||
|
@ -75,7 +75,7 @@ export default class BoostModal extends ImmutablePureComponent {
|
|||
|
||||
<div className='favourite-modal__action-bar'>
|
||||
<div><FormattedMessage id='favourite_modal.combo' defaultMessage='You can press {combo} to skip this next time' values={{ combo: <span>Shift + <i className='fa fa-star' /></span> }} /></div>
|
||||
<Button text={intl.formatMessage(messages.reblog)} onClick={this.handleReblog} ref={this.setRef} />
|
||||
<Button text={intl.formatMessage(messages.favourite)} onClick={this.handleFavourite} ref={this.setRef} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue