forked from AkkomaGang/akkoma-fe
Merge branch 'feat/add-you-to-last-message' into 'develop'
fix #894 add simple You: to chat list last message Closes #894 See merge request pleroma/pleroma-fe!1181
This commit is contained in:
commit
4cdfe4235d
2 changed files with 7 additions and 4 deletions
|
@ -37,12 +37,14 @@ const ChatListItem = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
messageForStatusContent () {
|
messageForStatusContent () {
|
||||||
const content = this.chat.lastMessage ? (this.attachmentInfo || this.chat.lastMessage.content) : ''
|
const message = this.chat.lastMessage
|
||||||
|
const isYou = message && message.account_id === this.currentUser.id
|
||||||
|
const content = message ? (this.attachmentInfo || message.content) : ''
|
||||||
|
const messagePreview = isYou ? `<i>${this.$t('chats.you')}</i> ${content}` : content
|
||||||
return {
|
return {
|
||||||
summary: '',
|
summary: '',
|
||||||
statusnet_html: content,
|
statusnet_html: messagePreview,
|
||||||
text: content,
|
text: messagePreview,
|
||||||
attachments: []
|
attachments: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -786,6 +786,7 @@
|
||||||
"password_reset_required_but_mailer_is_disabled": "You must reset your password, but password reset is disabled. Please contact your instance administrator."
|
"password_reset_required_but_mailer_is_disabled": "You must reset your password, but password reset is disabled. Please contact your instance administrator."
|
||||||
},
|
},
|
||||||
"chats": {
|
"chats": {
|
||||||
|
"you": "You:",
|
||||||
"message_user": "Message {nickname}",
|
"message_user": "Message {nickname}",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"chats": "Chats",
|
"chats": "Chats",
|
||||||
|
|
Loading…
Reference in a new issue