ssb: Fall back to hostnames for connections in the sidebar.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m36s

This commit is contained in:
Cory McWilliams 2025-04-12 07:05:37 -04:00
parent 1516e17f5d
commit 3f4738e593
3 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&Why7U4i/hsoURJkoHSBkayV4MLSYJR+s9W+Z2/zHaYc=.sha256"
"previous": "&XHioN0J0rvGR7c0jWUfyH3U49Elj+p8R2r/dRn4iAoM=.sha256"
}

View File

@ -232,6 +232,7 @@ class TfTabNewsElement extends LitElement {
class="w3-bar-item"
style="max-width: 100%"
id=${x.id}
fallback_name=${x.host}
.users=${this.users}
></tf-user>
`

View File

@ -6,6 +6,7 @@ class TfUserElement extends LitElement {
static get properties() {
return {
id: {type: String},
fallback_name: {type: String},
users: {type: Object},
};
}
@ -15,6 +16,7 @@ class TfUserElement extends LitElement {
constructor() {
super();
this.id = null;
this.fallback_name = null;
this.users = {};
}
@ -31,7 +33,7 @@ class TfUserElement extends LitElement {
>`;
let name = this.users?.[this.id]?.name;
name = html`<a target="_top" href=${'#' + this.id}
>${name !== undefined ? name : this.id}</a
>${name ?? this.fallback_name ?? this.id}</a
>`;
if (user) {