feat: Add link to the Twitter profile of the sender (#1597)
This commit is contained in:
parent
a2d6fa0f74
commit
1266f0ab8c
1 changed files with 15 additions and 3 deletions
|
@ -42,7 +42,13 @@
|
|||
</div>
|
||||
<spinner v-if="isPending" size="tiny" />
|
||||
|
||||
<div v-if="isATweet && isIncoming && sender" class="sender--info">
|
||||
<a
|
||||
v-if="isATweet && isIncoming && sender"
|
||||
class="sender--info"
|
||||
:href="twitterProfileLink"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer nofollow"
|
||||
>
|
||||
<woot-thumbnail
|
||||
:src="sender.thumbnail"
|
||||
:username="sender.name"
|
||||
|
@ -51,7 +57,7 @@
|
|||
<div class="sender--available-name">
|
||||
{{ sender.name }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
|
@ -104,6 +110,11 @@ export default {
|
|||
} = this;
|
||||
return contentType;
|
||||
},
|
||||
twitterProfileLink() {
|
||||
const additionalAttributes = this.sender.additional_attributes || {};
|
||||
const { screen_name: screenName } = additionalAttributes;
|
||||
return `https://twitter.com/${screenName}`;
|
||||
},
|
||||
alignBubble() {
|
||||
return !this.data.message_type ? 'left' : 'right';
|
||||
},
|
||||
|
@ -181,8 +192,9 @@ export default {
|
|||
}
|
||||
|
||||
.sender--info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--b-700);
|
||||
display: inline-flex;
|
||||
padding: var(--space-smaller) 0;
|
||||
|
||||
.sender--available-name {
|
||||
|
|
Loading…
Reference in a new issue