forked from cory/tildefriends
ssb: Fall back to hostnames for connections in the sidebar.
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user