Compare commits
No commits in common. "2507a0c5771984d46b50416c03dfb1bd01bbcdde" and "a36e60f5084a8fc8317091fac7856bc707cfe1cb" have entirely different histories.
2507a0c577
...
a36e60f508
5 changed files with 21 additions and 25 deletions
|
|
@ -13,7 +13,6 @@ import StatusContent from 'src/components/status_content/status_content.vue'
|
||||||
import StatusPopover from 'src/components/status_popover/status_popover.vue'
|
import StatusPopover from 'src/components/status_popover/status_popover.vue'
|
||||||
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
import UserPopover from 'src/components/user_popover/user_popover.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 { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInterfaceStore } from 'src/stores/interface'
|
import { useInterfaceStore } from 'src/stores/interface'
|
||||||
|
|
@ -55,9 +54,17 @@ const ChatMessage = {
|
||||||
UserPopover,
|
UserPopover,
|
||||||
StatusPopover,
|
StatusPopover,
|
||||||
MentionLink,
|
MentionLink,
|
||||||
Timeago,
|
|
||||||
},
|
},
|
||||||
computed: {
|
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() {
|
isStatus() {
|
||||||
// ChatMessage only has account_id while Status has full user data
|
// ChatMessage only has account_id while Status has full user data
|
||||||
return !!this.message.user
|
return !!this.message.user
|
||||||
|
|
@ -83,10 +90,6 @@ 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 || isBrokenReply)"
|
v-if="isStatus && isCustomReply"
|
||||||
keypath="status.reply_to_with_arg"
|
keypath="status.reply_to_with_arg"
|
||||||
scope="global"
|
scope="global"
|
||||||
tag="small"
|
tag="small"
|
||||||
|
|
@ -16,10 +16,8 @@
|
||||||
<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"
|
||||||
|
|
@ -39,9 +37,6 @@
|
||||||
</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 -->
|
||||||
|
|
@ -167,16 +162,7 @@
|
||||||
spin
|
spin
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
{{ ' ' }}
|
{{ createdAt }}
|
||||||
<router-link
|
|
||||||
class="timeago faint"
|
|
||||||
:to="{ name: 'conversation', params: { id: message.id } }"
|
|
||||||
>
|
|
||||||
<Timeago
|
|
||||||
:time="message.created_at"
|
|
||||||
:auto-update="60"
|
|
||||||
/>
|
|
||||||
</router-link>
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</StatusContent>
|
</StatusContent>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import ChatMessageList from 'src/components/chat_message_list/chat_message_list.
|
||||||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
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 QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue'
|
||||||
import QuickViewSettings from 'src/components/quick_view_settings/quick_view_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 ThreadTree from 'src/components/thread_tree/thread_tree.vue'
|
||||||
|
|
||||||
import { useInterfaceStore } from 'src/stores/interface'
|
import { useInterfaceStore } from 'src/stores/interface'
|
||||||
|
|
@ -426,6 +427,7 @@ const conversation = {
|
||||||
QuickViewSettings,
|
QuickViewSettings,
|
||||||
ChatMessageList,
|
ChatMessageList,
|
||||||
PostStatusForm,
|
PostStatusForm,
|
||||||
|
StatusContent,
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
statusId(newVal, oldVal) {
|
statusId(newVal, oldVal) {
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
class="chat-view-reply-form panel-footer -flexible-height"
|
class="chat-view-reply-form panel-footer -flexible-height"
|
||||||
>
|
>
|
||||||
<div class="auto-reply-to-section">
|
<div class="auto-reply-to-section">
|
||||||
<span class="reply-to-text">
|
<h4 class="reply-to-text">
|
||||||
{{ explicitReplyStatus ? $t('status.reply_to_selected') : $t('status.reply_to_last') }}
|
{{ explicitReplyStatus ? $t('status.reply_to_selected') : $t('status.reply_to_last') }}
|
||||||
<button
|
<button
|
||||||
v-if="explicitReplyStatus"
|
v-if="explicitReplyStatus"
|
||||||
|
|
@ -223,7 +223,13 @@
|
||||||
<FAIcon icon="times" />
|
<FAIcon icon="times" />
|
||||||
{{ $t('general.cancel') }}
|
{{ $t('general.cancel') }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</h4>
|
||||||
|
<StatusContent
|
||||||
|
:status="replyStatus"
|
||||||
|
class="reply-to-preview"
|
||||||
|
compact
|
||||||
|
collapse
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<PostStatusForm
|
<PostStatusForm
|
||||||
class="reply-form"
|
class="reply-form"
|
||||||
|
|
|
||||||
|
|
@ -1662,7 +1662,6 @@
|
||||||
"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