Add other actions for non-current-user messages
This commit is contained in:
parent
9768203f1b
commit
f662023480
1 changed files with 14 additions and 0 deletions
|
@ -30,6 +30,8 @@ const messages = defineMessages({
|
||||||
more: { id: 'chats.actions.more', defaultMessage: 'More' },
|
more: { id: 'chats.actions.more', defaultMessage: 'More' },
|
||||||
delete: { id: 'chats.actions.delete', defaultMessage: 'Delete for both' },
|
delete: { id: 'chats.actions.delete', defaultMessage: 'Delete for both' },
|
||||||
copy: { id: 'chats.actions.copy', defaultMessage: 'Copy' },
|
copy: { id: 'chats.actions.copy', defaultMessage: 'Copy' },
|
||||||
|
report: { id: 'chats.actions.report', defaultMessage: 'Report' },
|
||||||
|
deleteForMe: { id: 'chats.actions.deleteForMe', defaultMessage: 'Delete for me' },
|
||||||
blockedBy: { id: 'chat_message_list.blockedBy', defaultMessage: 'You are blocked by' },
|
blockedBy: { id: 'chat_message_list.blockedBy', defaultMessage: 'You are blocked by' },
|
||||||
networkFailureTitle: { id: 'chat_message_list.network_failure.title', defaultMessage: 'Whoops!' },
|
networkFailureTitle: { id: 'chat_message_list.network_failure.title', defaultMessage: 'Whoops!' },
|
||||||
networkFailureSubtitle: { id: 'chat_message_list.network_failure.subtitle', defaultMessage: 'We encountered a network failure.' },
|
networkFailureSubtitle: { id: 'chat_message_list.network_failure.subtitle', defaultMessage: 'We encountered a network failure.' },
|
||||||
|
@ -241,6 +243,18 @@ const ChatMessageList: React.FC<IChatMessageList> = ({ chat, autosize }) => {
|
||||||
icon: require('@tabler/icons/trash.svg'),
|
icon: require('@tabler/icons/trash.svg'),
|
||||||
destructive: true,
|
destructive: true,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
menu.push({
|
||||||
|
text: intl.formatMessage(messages.report),
|
||||||
|
action: () => null, // TODO: implement once API is available
|
||||||
|
icon: require('@tabler/icons/flag.svg'),
|
||||||
|
});
|
||||||
|
menu.push({
|
||||||
|
text: intl.formatMessage(messages.deleteForMe),
|
||||||
|
action: () => null, // TODO: implement once API is available
|
||||||
|
icon: require('@tabler/icons/trash.svg'),
|
||||||
|
destructive: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue