diff --git a/src/components/chat_message/chat_message.js b/src/components/chat_message/chat_message.js index a71014078..01bac858e 100644 --- a/src/components/chat_message/chat_message.js +++ b/src/components/chat_message/chat_message.js @@ -13,6 +13,7 @@ import StatusContent from 'src/components/status_content/status_content.vue' import StatusPopover from 'src/components/status_popover/status_popover.vue' import UserAvatar from 'src/components/user_avatar/user_avatar.vue' import UserPopover from 'src/components/user_popover/user_popover.vue' +import Timeago from 'src/components/timeago/timeago.vue' import { useInstanceStore } from 'src/stores/instance.js' import { useInterfaceStore } from 'src/stores/interface' @@ -54,17 +55,9 @@ const ChatMessage = { UserPopover, StatusPopover, MentionLink, + Timeago, }, computed: { - // Returns HH:MM (hours and minutes) in local time. - createdAt() { - const time = this.chatItem.data.created_at - return time.toLocaleTimeString('en', { - hour: '2-digit', - minute: '2-digit', - hour12: false, - }) - }, isStatus() { // ChatMessage only has account_id while Status has full user data return !!this.message.user @@ -90,6 +83,10 @@ const ChatMessage = { 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() { return this.$store.state.statuses.allStatusesObject[ this.chatItem.data.in_reply_to_status_id diff --git a/src/components/chat_message/chat_message.vue b/src/components/chat_message/chat_message.vue index 234d20cb2..bc50d56a6 100644 --- a/src/components/chat_message/chat_message.vue +++ b/src/components/chat_message/chat_message.vue @@ -7,7 +7,7 @@ @mouseleave="onHover(false)" >
+ + {{ $t('status.broken_reply') }} + diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 91ffc09a3..4804b3c7a 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -6,7 +6,6 @@ import ChatMessageList from 'src/components/chat_message_list/chat_message_list. import PostStatusForm from 'src/components/post_status_form/post_status_form.vue' import QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue' import QuickViewSettings from 'src/components/quick_view_settings/quick_view_settings.vue' -import StatusContent from 'src/components/status_content/status_content.vue' import ThreadTree from 'src/components/thread_tree/thread_tree.vue' import { useInterfaceStore } from 'src/stores/interface' @@ -427,7 +426,6 @@ const conversation = { QuickViewSettings, ChatMessageList, PostStatusForm, - StatusContent, }, watch: { statusId(newVal, oldVal) { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 19d63fbbe..bdfd08e6b 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -213,7 +213,7 @@ class="chat-view-reply-form panel-footer -flexible-height" >
-

+ {{ explicitReplyStatus ? $t('status.reply_to_selected') : $t('status.reply_to_last') }} -

- +