Hide the reactions button if there aren't any.
This commit is contained in:
parent
b5ed7014f6
commit
8c759bcbac
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🐌",
|
"emoji": "🐌",
|
||||||
"previous": "&UDqtNEELPRZAP6jSrcKfoXpAr8s7GjWmWLOQINN4kmg=.sha256"
|
"previous": "&n79T1PqC7BjDlQsKdVx2ghkjJVfYfq8uWrK0aoeL+qM=.sha256"
|
||||||
}
|
}
|
||||||
|
@ -72,19 +72,21 @@ class TfMessageElement extends LitElement {
|
|||||||
return expression;
|
return expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return html`<div class="w3-button" @click=${this.show_reactions}>
|
if (this.message?.votes?.length) {
|
||||||
${(this.message.votes || []).map(
|
return html`<div class="w3-button" @click=${this.show_reactions}>
|
||||||
(vote) => html`
|
${(this.message.votes || []).map(
|
||||||
<span
|
(vote) => html`
|
||||||
title="${this.users[vote.author]?.name ?? vote.author} ${new Date(
|
<span
|
||||||
vote.timestamp
|
title="${this.users[vote.author]?.name ?? vote.author} ${new Date(
|
||||||
)}"
|
vote.timestamp
|
||||||
>
|
)}"
|
||||||
${normalize_expression(vote.content.vote.expression)}
|
>
|
||||||
</span>
|
${normalize_expression(vote.content.vote.expression)}
|
||||||
`
|
</span>
|
||||||
)}
|
`
|
||||||
</div>`;
|
)}
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render_raw() {
|
render_raw() {
|
||||||
|
Loading…
Reference in New Issue
Block a user