Move mime type shenanigans from JS => C.
This commit is contained in:
@ -22,7 +22,8 @@ class TfUserElement extends LitElement {
|
||||
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>`;
|
||||
>?</span
|
||||
>`;
|
||||
let name = this.users?.[this.id]?.name;
|
||||
name =
|
||||
name !== undefined
|
||||
@ -31,7 +32,8 @@ class TfUserElement extends LitElement {
|
||||
|
||||
if (this.users[this.id]) {
|
||||
let image_link = this.users[this.id].image;
|
||||
image_link = typeof image_link == 'string' ? image_link : image_link?.link;
|
||||
image_link =
|
||||
typeof image_link == 'string' ? image_link : image_link?.link;
|
||||
if (image_link !== undefined) {
|
||||
image = html`<img
|
||||
class="w3-circle"
|
||||
@ -41,8 +43,7 @@ class TfUserElement extends LitElement {
|
||||
}
|
||||
}
|
||||
return html` <div style="display: inline-block; font-weight: bold">
|
||||
${image}
|
||||
${name}
|
||||
${image} ${name}
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user