fixes, functioning now
This commit is contained in:
parent
a489e5d5cd
commit
22cdbca82c
|
@ -205,7 +205,7 @@ export default class Status extends ImmutablePureComponent {
|
||||||
this.props.onReply(this.props.status, this.context.router.history);
|
this.props.onReply(this.props.status, this.context.router.history);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleHotkeyFavourite = e => {
|
handleHotkeyFavourite = (e) => {
|
||||||
this.props.onFavourite(this.props.status, e);
|
this.props.onFavourite(this.props.status, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,8 @@ export default class StatusActionBar extends ImmutablePureComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFavouriteClick = () => {
|
handleFavouriteClick = (e) => {
|
||||||
this.props.onFavourite(this.props.status);
|
this.props.onFavourite(this.props.status, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleReblogClick = (e) => {
|
handleReblogClick = (e) => {
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default class Status extends ImmutablePureComponent {
|
||||||
if (status.get('favourited')) {
|
if (status.get('favourited')) {
|
||||||
this.props.dispatch(unfavourite(status));
|
this.props.dispatch(unfavourite(status));
|
||||||
} else {
|
} else {
|
||||||
if (e.shiftKey || !favoriteModal) {
|
if (e.shiftKey || !favouriteModal) {
|
||||||
this.handleModalFavourite(status);
|
this.handleModalFavourite(status);
|
||||||
} else {
|
} else {
|
||||||
this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite }));
|
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';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
reblog: { id: 'status.favourite', defaultMessage: 'Favourite' },
|
favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
|
||||||
});
|
});
|
||||||
|
|
||||||
@injectIntl
|
@injectIntl
|
||||||
export default class BoostModal extends ImmutablePureComponent {
|
export default class FavouriteModal extends ImmutablePureComponent {
|
||||||
|
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: PropTypes.object,
|
router: PropTypes.object,
|
||||||
|
@ -22,7 +22,7 @@ export default class BoostModal extends ImmutablePureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
status: ImmutablePropTypes.map.isRequired,
|
status: ImmutablePropTypes.map.isRequired,
|
||||||
onReblog: PropTypes.func.isRequired,
|
onFavourite: PropTypes.func.isRequired,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
@ -75,7 +75,7 @@ export default class BoostModal extends ImmutablePureComponent {
|
||||||
|
|
||||||
<div className='favourite-modal__action-bar'>
|
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue