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>
|
</div>
|
||||||
<spinner v-if="isPending" size="tiny" />
|
<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
|
<woot-thumbnail
|
||||||
:src="sender.thumbnail"
|
:src="sender.thumbnail"
|
||||||
:username="sender.name"
|
:username="sender.name"
|
||||||
|
@ -51,7 +57,7 @@
|
||||||
<div class="sender--available-name">
|
<div class="sender--available-name">
|
||||||
{{ sender.name }}
|
{{ sender.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
@ -104,6 +110,11 @@ export default {
|
||||||
} = this;
|
} = this;
|
||||||
return contentType;
|
return contentType;
|
||||||
},
|
},
|
||||||
|
twitterProfileLink() {
|
||||||
|
const additionalAttributes = this.sender.additional_attributes || {};
|
||||||
|
const { screen_name: screenName } = additionalAttributes;
|
||||||
|
return `https://twitter.com/${screenName}`;
|
||||||
|
},
|
||||||
alignBubble() {
|
alignBubble() {
|
||||||
return !this.data.message_type ? 'left' : 'right';
|
return !this.data.message_type ? 'left' : 'right';
|
||||||
},
|
},
|
||||||
|
@ -181,8 +192,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sender--info {
|
.sender--info {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
color: var(--b-700);
|
||||||
|
display: inline-flex;
|
||||||
padding: var(--space-smaller) 0;
|
padding: var(--space-smaller) 0;
|
||||||
|
|
||||||
.sender--available-name {
|
.sender--available-name {
|
||||||
|
|
Loading…
Reference in a new issue