ssb: The red border is too much and stacks poorly. Let's try the same unread icon from the sidebar.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 31m51s

This commit is contained in:
Cory McWilliams 2025-06-04 12:24:04 -04:00
parent 3bbc8c4d35
commit 7882fcbe8f
2 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&ePqnCcU373yUI01WtrFFKt+W/doAuMiN4g8qBt5p+rk=.sha256"
"previous": "&JfWdlllyfUCzLARI/4tNR1Xlfx8nN3ONBSCipVhGd6g=.sha256"
}

View File

@ -27,14 +27,7 @@ class TfMessageElement extends LitElement {
};
}
static styles = [
...styles,
css`
.unread {
border-left: 2px solid red !important;
}
`,
];
static styles = styles;
constructor() {
super();
@ -422,7 +415,7 @@ class TfMessageElement extends LitElement {
return this.message?.decrypted
? 'w3-pale-red'
: this.message?.rowid >= this.channel_unread
? 'w3-theme-d2 unread'
? 'w3-theme-d2'
: 'w3-theme-d4';
}
@ -513,7 +506,10 @@ class TfMessageElement extends LitElement {
return html`
<header class="w3-bar">
<span class="w3-bar-item">
<tf-user id=${this.message.author} .users=${this.users}></tf-user>
${this.render_unread_icon()}<tf-user
id=${this.message.author}
.users=${this.users}
></tf-user>
</span>
${is_encrypted} ${this.render_menu()}
<div class="w3-bar-item w3-right" style="text-wrap: nowrap">
@ -635,6 +631,10 @@ class TfMessageElement extends LitElement {
return result;
}
render_unread_icon() {
return this.message?.rowid >= this.channel_unread ? html`✉️` : undefined;
}
render() {
let content = this.message?.content;
if (this.message?.decrypted?.type == 'post') {