ssb: Make the reactions list dialog a bit more compact/concise.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m53s

This commit is contained in:
Cory McWilliams 2025-04-20 09:35:39 -04:00
parent 3830d695d7
commit efb3a12dcc
3 changed files with 25 additions and 23 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🦀", "emoji": "🦀",
"previous": "&jko2iokTaY2t/pD9m4ekMr0wsLjov3LVl9ShysXEjkE=.sha256" "previous": "&Zv/eOewtUPxYuALmYV8v+JDKwH4+aN8zCTYFwB7oYEw=.sha256"
} }

View File

@ -41,18 +41,21 @@ class TfReactionsModalElement extends LitElement {
> >
</header> </header>
<ul class="w3-theme-dark w3-container w3-ul"> <ul class="w3-theme-dark w3-container w3-ul">
${this.votes.map( ${this.votes
.sort((x, y) => y.timestamp - x.timestamp)
.map(
(x) => html` (x) => html`
<li class="w3-bar"> <li style="display: flex; flex-direction: row; gap: 4px">
<span class="w3-bar-item" <span style="flex-basis: 3em"
>${x?.content?.vote?.expression}</span >${x?.content?.vote?.expression}</span
> >
<tf-user <tf-user
class="w3-bar-item" style="flex: 1 1"
id=${x.author} id=${x.author}
.users=${this.users} .users=${this.users}
></tf-user> ></tf-user>
<span class="w3-bar-item w3-right" <span
style="flex-shrink: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>${new Date(x?.timestamp).toLocaleString()}</span >${new Date(x?.timestamp).toLocaleString()}</span
> >
</li> </li>

View File

@ -179,11 +179,10 @@ class TfTabNewsFeedElement extends LitElement {
JOIN messages ON messages.rowid = messages_fts.rowid JOIN messages ON messages.rowid = messages_fts.rowid
JOIN json_each(?1) AS following ON messages.author = following.value JOIN json_each(?1) AS following ON messages.author = following.value
JOIN json_tree(messages.content, '$.mentions') AS mention ON mention.value = '#' || ?4 JOIN json_tree(messages.content, '$.mentions') AS mention ON mention.value = '#' || ?4
), )
news AS (SELECT * FROM all_news SELECT TRUE AS is_primary, all_news.* FROM all_news
WHERE (?2 IS NULL OR all_news.timestamp >= ?2) AND all_news.timestamp < ?3 WHERE (?2 IS NULL OR all_news.timestamp >= ?2) AND all_news.timestamp < ?3
ORDER BY all_news.timestamp DESC LIMIT 20) ORDER BY all_news.timestamp DESC LIMIT 20
SELECT TRUE AS is_primary, news.* FROM news
`, `,
[ [
JSON.stringify(this.following), JSON.stringify(this.following),