ssb: Indicate connection status with some colors in the connections list in the sidebar. #122
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
Cory McWilliams 2025-05-31 11:28:09 -04:00
parent 6f71ffb477
commit 2408e076ff
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&F7YXac7Ds65INEMv9txEFoRALIuQzhu03Ke+ZrTt9A8=.sha256"
"previous": "&Or8fTzbrcxzdGAtSI3AZNQbS97+mJ/zVkGJx+uIzBeY=.sha256"
}

View File

@ -235,12 +235,18 @@ class TfTabNewsElement extends LitElement {
<h4 style="margin: 0">Connections</h4>
</a>
${this.connections
.filter((x) => x.id && !x.destroy_reason)
.filter((x) => x.id)
.map(
(x) => html`
<tf-user
class="w3-bar-item"
style="max-width: 100%"
style=${x.destroy_reason
? 'border-left: 4px solid red; border-right: 4px solid red'
: x.connected
? x.flags?.one_shot
? 'border-left: 4px solid blue; border-right: 4px solid blue'
: 'border-left: 4px solid green; border-right: 4px solid green'
: ''}
id=${x.id}
fallback_name=${x.host}
.users=${this.users}