Compare commits

..

No commits in common. "46e711f0a5ec10a3db228c3a2c76a7919aec4e04" and "27b275548ea1aeffa1fe72594541475b24b80f4e" have entirely different histories.

2 changed files with 15 additions and 18 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🐌", "emoji": "🐌",
"previous": "&wA6sLaDxtYeFdVCCu8jyhPsGYtGZEjbWQHeGOn0Yifg=.sha256" "previous": "&6dwXL1RKL8t/RSV0UHBflkMnM8f8SV9VFvBZFqhW6LI=.sha256"
} }

View File

@ -19,10 +19,6 @@ class TfUserElement extends LitElement {
} }
render() { render() {
let image = html`<span
class="w3-theme-light w3-circle"
style="display: inline-block; width: 2em; height: 2em; text-align: center; line-height: 2em"
>?</span>`;
let name = this.users?.[this.id]?.name; let name = this.users?.[this.id]?.name;
name = name =
name !== undefined name !== undefined
@ -30,20 +26,21 @@ class TfUserElement extends LitElement {
: html`<a target="_top" href=${'#' + this.id}>${this.id}</a>`; : html`<a target="_top" href=${'#' + this.id}>${this.id}</a>`;
if (this.users[this.id]) { if (this.users[this.id]) {
let image_link = this.users[this.id].image; let image = this.users[this.id].image;
image_link = typeof image_link == 'string' ? image_link : image_link?.link; image = typeof image == 'string' ? image : image?.link;
if (image_link !== undefined) { return html` <div style="display: inline-block; font-weight: bold">
image = html`<img <img
class="w3-circle" style="width: 2em; height: 2em; vertical-align: middle; border-radius: 50%"
style="width: 2em; height: 2em; vertical-align: middle" ?hidden=${image === undefined}
src="/${image_link}/view" src="${image ? '/' + image + '/view' : undefined}"
/>`; />
} ${name}
</div>`;
} else {
return html` <div style="display: inline-block; font-weight: bold">
${name}
</div>`;
} }
return html` <div style="display: inline-block; font-weight: bold">
${image}
${name}
</div>`;
} }
} }