handling broken replies
This commit is contained in:
parent
52af3c4420
commit
298e0af99e
3 changed files with 11 additions and 1 deletions
|
|
@ -90,6 +90,10 @@ const ChatMessage = {
|
||||||
this.previousItem.data.id !== this.chatItem.data.in_reply_to_status_id
|
this.previousItem.data.id !== this.chatItem.data.in_reply_to_status_id
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
isBrokenReply() {
|
||||||
|
if (!this.previousItem) return false
|
||||||
|
return !this.chatItem.data.in_reply_to_status_id
|
||||||
|
},
|
||||||
customReplyTo() {
|
customReplyTo() {
|
||||||
return this.$store.state.statuses.allStatusesObject[
|
return this.$store.state.statuses.allStatusesObject[
|
||||||
this.chatItem.data.in_reply_to_status_id
|
this.chatItem.data.in_reply_to_status_id
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
@mouseleave="onHover(false)"
|
@mouseleave="onHover(false)"
|
||||||
>
|
>
|
||||||
<i18n-t
|
<i18n-t
|
||||||
v-if="isStatus && isCustomReply"
|
v-if="isStatus && (isCustomReply || isBrokenReply)"
|
||||||
keypath="status.reply_to_with_arg"
|
keypath="status.reply_to_with_arg"
|
||||||
scope="global"
|
scope="global"
|
||||||
tag="small"
|
tag="small"
|
||||||
|
|
@ -16,8 +16,10 @@
|
||||||
<template #replyToWithIcon>
|
<template #replyToWithIcon>
|
||||||
<div class="avatar-spacer" />
|
<div class="avatar-spacer" />
|
||||||
<StatusPopover
|
<StatusPopover
|
||||||
|
v-if="!isBrokenReply"
|
||||||
:status-id="customReplyTo?.id"
|
:status-id="customReplyTo?.id"
|
||||||
class="reply-to-popover"
|
class="reply-to-popover"
|
||||||
|
:class="{ '-strikethrough': !message.parent_visible }"
|
||||||
>
|
>
|
||||||
<i18n-t
|
<i18n-t
|
||||||
keypath="status.reply_to_with_icon"
|
keypath="status.reply_to_with_icon"
|
||||||
|
|
@ -37,6 +39,9 @@
|
||||||
</template>
|
</template>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</StatusPopover>
|
</StatusPopover>
|
||||||
|
<span v-else class="reply-label">
|
||||||
|
{{ $t('status.broken_reply') }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #user>
|
<template #user>
|
||||||
<!-- v-if is there because status might not be loaded yet -->
|
<!-- v-if is there because status might not be loaded yet -->
|
||||||
|
|
|
||||||
|
|
@ -1662,6 +1662,7 @@
|
||||||
"reply_to_selected": "Replying to selected message",
|
"reply_to_selected": "Replying to selected message",
|
||||||
"reply_to_last": "Replying to last message",
|
"reply_to_last": "Replying to last message",
|
||||||
"reply_to_with_icon": "{icon} {replyTo}",
|
"reply_to_with_icon": "{icon} {replyTo}",
|
||||||
|
"broken_reply": "Message belongs to the thread but is not a reply",
|
||||||
"reply_to_with_arg": "{replyToWithIcon} {user}",
|
"reply_to_with_arg": "{replyToWithIcon} {user}",
|
||||||
"mentions": "Mentions",
|
"mentions": "Mentions",
|
||||||
"replies_list": "Replies:",
|
"replies_list": "Replies:",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue