mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
feat(MessageBody): show editor near timestamp when it is own message but edited by someone else
Signed-off-by: Dorra Jaouad <dorra.jaoued7@gmail.com>
This commit is contained in:
parent
e4aced480d
commit
5e5307f860
1 changed files with 32 additions and 1 deletions
|
|
@ -76,6 +76,18 @@
|
|||
<div
|
||||
v-if="!isDeletedMessage"
|
||||
class="message-main__info">
|
||||
<span v-if="isSplitViewEnabled && isOwnMessage && message.lastEditTimestamp" class="editor">
|
||||
<IconPencilOutline :size="14" />
|
||||
<AvatarWrapper
|
||||
v-if="isEditorDifferentThenAuthor"
|
||||
:id="message.lastEditActorId"
|
||||
:token="message.token"
|
||||
:name="message.lastEditActorDisplayName"
|
||||
:source="message.lastEditActorType"
|
||||
:size="14"
|
||||
disable-menu
|
||||
disable-tooltip />
|
||||
</span>
|
||||
<span class="date" :class="{ 'date--hidden': hideDate }" :title="messageDate">{{ messageTime }}</span>
|
||||
|
||||
<!-- Message delivery status indicators -->
|
||||
|
|
@ -161,7 +173,9 @@ import IconCancel from 'vue-material-design-icons/Cancel.vue'
|
|||
import IconCheck from 'vue-material-design-icons/Check.vue'
|
||||
import IconCheckAll from 'vue-material-design-icons/CheckAll.vue'
|
||||
import IconForumOutline from 'vue-material-design-icons/ForumOutline.vue'
|
||||
import IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'
|
||||
import IconReload from 'vue-material-design-icons/Reload.vue'
|
||||
import AvatarWrapper from '../../../../AvatarWrapper/AvatarWrapper.vue'
|
||||
import MessageQuote from '../../../../MessageQuote.vue'
|
||||
import CallButton from '../../../../TopBar/CallButton.vue'
|
||||
import ConversationActionsShortcut from '../../../../UIShared/ConversationActionsShortcut.vue'
|
||||
|
|
@ -188,6 +202,7 @@ export default {
|
|||
name: 'MessageBody',
|
||||
|
||||
components: {
|
||||
AvatarWrapper,
|
||||
CallButton,
|
||||
NcButton,
|
||||
NcRichText,
|
||||
|
|
@ -202,6 +217,7 @@ export default {
|
|||
IconCheck,
|
||||
IconCheckAll,
|
||||
IconForumOutline,
|
||||
IconPencilOutline,
|
||||
IconReload,
|
||||
},
|
||||
|
||||
|
|
@ -420,7 +436,7 @@ export default {
|
|||
},
|
||||
|
||||
isOwnMessage() {
|
||||
return this.actorStore.checkIfSelfIsActor(this.message)
|
||||
return this.actorStore.checkIfSelfIsActor(this.message) && !this.isSystemMessage
|
||||
},
|
||||
|
||||
isShortSimpleMessage() {
|
||||
|
|
@ -431,6 +447,13 @@ export default {
|
|||
&& Object.keys(this.message.reactions).length === 0
|
||||
&& this.message.message.split('\n').length === 1
|
||||
},
|
||||
|
||||
isEditorDifferentThenAuthor() {
|
||||
return this.message.lastEditActorId
|
||||
&& this.message.lastEditActorId !== this.message.actorId
|
||||
&& this.message.lastEditActorDisplayName !== this.message.actorDisplayName
|
||||
&& this.message.lastEditActorType !== this.message.actorType
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -582,6 +605,14 @@ export default {
|
|||
align-items: end;
|
||||
font-size: var(--font-size-small);
|
||||
width: auto;
|
||||
|
||||
.editor {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-inline-end: var(--default-grid-baseline);
|
||||
gap: calc(var(--default-grid-baseline) / 2);
|
||||
height: 1lh;
|
||||
}
|
||||
}
|
||||
|
||||
.date {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue