Prevent votes from overflowing.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 17m23s

This commit is contained in:
Cory McWilliams 2024-09-23 12:43:48 -04:00
parent e5f58c2898
commit d104409272
2 changed files with 17 additions and 13 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🐌",
"previous": "&6oHPQCA26v+4nBXv+YUdCT43j2DpXDspxhHSSRydkiw=.sha256"
"previous": "&7L314QLuVl8kNbFIWuXXeLqIVefUe5S66WvEmOMQb2U=.sha256"
}

View File

@ -73,18 +73,22 @@ class TfMessageElement extends LitElement {
}
}
if (this.message?.votes?.length) {
return html`<div class="w3-button" @click=${this.show_reactions}>
${(this.message.votes || []).map(
(vote) => html`
<span
title="${this.users[vote.author]?.name ?? vote.author} ${new Date(
vote.timestamp
)}"
>
${normalize_expression(vote.content.vote.expression)}
</span>
`
)}
return html`
<div class="w3-container">
<div class="w3-button w3-bar w3-padding-small" @click=${this.show_reactions}>
${(this.message.votes || []).map(
(vote) => html`
<span
class="w3-bar-item w3-padding-small"
title="${this.users[vote.author]?.name ?? vote.author} ${new Date(
vote.timestamp
)}"
>
${normalize_expression(vote.content.vote.expression)}
</span>
`
)}
</div>
</div>`;
}
}