Skip to content

Commit

Permalink
Make sender to be centered with the avatar and timestamps
Browse files Browse the repository at this point in the history
Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Jun 14, 2022
1 parent d6167e0 commit a1fd9c3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/ThreadEnvelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
class="left"
:class="{seen: envelope.flags.seen}"
@click.native.prevent="$emit('toggleExpand', $event)">
<div class="sender">
<div class="sender"
:class="{ 'centered-sender': centeredSender }">
{{ envelope.from && envelope.from[0] ? envelope.from[0].label : '' }}
</div>
<div v-if="hasChangedSubject" class="subject">
Expand Down Expand Up @@ -198,6 +199,9 @@ export default {
cleanSubject() {
return this.envelope.subject.replace(/((?:[\t ]*(?:R|RE|F|FW|FWD):[\t ]*)*)/i, '')
},
centeredSender() {
return (!this.hasChangedSubject || this.cleanSubject.length === 0) && this.tags.length === 0
},
},
watch: {
expanded(expanded) {
Expand Down Expand Up @@ -298,6 +302,9 @@ export default {
.sender {
margin-left: 8px;
}
.centered-sender {
margin-top: 8px;
}

.right {
display: flex;
Expand Down Expand Up @@ -442,4 +449,5 @@ export default {
.envelope--header.list-item-style {
border-radius: 16px;
}

</style>

0 comments on commit a1fd9c3

Please sign in to comment.