|
|
|
@ -8,6 +8,7 @@ import { me } from 'flavours/glitch/util/initial_state'; |
|
|
|
|
|
|
|
|
|
const messages = defineMessages({ |
|
|
|
|
delete: { id: 'status.delete', defaultMessage: 'Delete' }, |
|
|
|
|
direct: { id: 'status.direct', defaultMessage: 'Direct message @{name}' }, |
|
|
|
|
mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' }, |
|
|
|
|
reply: { id: 'status.reply', defaultMessage: 'Reply' }, |
|
|
|
|
reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, |
|
|
|
@ -43,6 +44,7 @@ export default class ActionBar extends React.PureComponent { |
|
|
|
|
onMuteConversation: PropTypes.func, |
|
|
|
|
onBlock: PropTypes.func, |
|
|
|
|
onDelete: PropTypes.func.isRequired, |
|
|
|
|
onDirect: PropTypes.func.isRequired, |
|
|
|
|
onMention: PropTypes.func.isRequired, |
|
|
|
|
onReport: PropTypes.func, |
|
|
|
|
onPin: PropTypes.func, |
|
|
|
@ -70,6 +72,10 @@ export default class ActionBar extends React.PureComponent { |
|
|
|
|
this.props.onDelete(this.props.status); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
handleDirectClick = () => { |
|
|
|
|
this.props.onDirect(this.props.status.get('account'), this.context.router.history); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
handleMentionClick = () => { |
|
|
|
|
this.props.onMention(this.props.status.get('account'), this.context.router.history); |
|
|
|
|
} |
|
|
|
@ -115,6 +121,7 @@ export default class ActionBar extends React.PureComponent { |
|
|
|
|
|
|
|
|
|
if (publicStatus) { |
|
|
|
|
menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); |
|
|
|
|
menu.push(null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (me === status.getIn(['account', 'id'])) { |
|
|
|
@ -128,6 +135,7 @@ export default class ActionBar extends React.PureComponent { |
|
|
|
|
menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick }); |
|
|
|
|
} else { |
|
|
|
|
menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick }); |
|
|
|
|
menu.push({ text: intl.formatMessage(messages.direct, { name: status.getIn(['account', 'username']) }), action: this.handleDirectClick }); |
|
|
|
|
menu.push(null); |
|
|
|
|
menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick }); |
|
|
|
|
menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick }); |
|
|
|
|