forked from cory/tildefriends
ssb: Hint at follow depth with profile image shape. Also, reload follow information the same way we re-determine channel unread status. Let's see if this feels good.
This commit is contained in:
@ -19,8 +19,10 @@ class TfUserElement extends LitElement {
|
||||
}
|
||||
|
||||
render() {
|
||||
let user = this.users[this.id];
|
||||
let shape = user && user.follow_depth >= 2 ? 'w3-circle' : 'w3-round';
|
||||
let image = html`<span
|
||||
class="w3-theme-light w3-circle"
|
||||
class=${'w3-theme-l4 ' + shape}
|
||||
style="display: inline-block; width: 2em; height: 2em; text-align: center; line-height: 2em"
|
||||
>?</span
|
||||
>`;
|
||||
@ -29,13 +31,13 @@ class TfUserElement extends LitElement {
|
||||
>${name !== undefined ? name : this.id}</a
|
||||
>`;
|
||||
|
||||
if (this.users[this.id]) {
|
||||
let image_link = this.users[this.id].image;
|
||||
if (user) {
|
||||
let image_link = user.image;
|
||||
image_link =
|
||||
typeof image_link == 'string' ? image_link : image_link?.link;
|
||||
if (image_link !== undefined) {
|
||||
image = html`<img
|
||||
class="w3-circle"
|
||||
class=${'w3-theme-l4 ' + shape}
|
||||
style="width: 2em; height: 2em; vertical-align: middle; object-fit: cover"
|
||||
src="/${image_link}/view"
|
||||
/>`;
|
||||
|
Reference in New Issue
Block a user