ssb: Show overall unread status on the hamburger menu.
Some checks failed
Build Tilde Friends / Build-All (push) Failing after 4m34s

This commit is contained in:
Cory McWilliams 2025-05-07 19:59:39 -04:00
parent eb9377e21d
commit c93b8fc045
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🦀", "emoji": "🦀",
"previous": "&RkHUl/WRe0UpvTB2W6cw0f4AeupL/2PEI1pXg5PDXBg=.sha256" "previous": "&gO8ganUDJtyGtfKUPRTbK2d34GJXhHKvHIZheF/lXI4=.sha256"
} }

View File

@ -97,7 +97,11 @@ class TfTabNewsElement extends LitElement {
} }
unread_status(channel) { unread_status(channel) {
if ( if (channel === undefined) {
if (Object.keys(this.channels_unread).some(x => this.unread_status(x))) {
return '✉️ ';
}
} else if (
this.channels_latest[channel] && this.channels_latest[channel] &&
this.channels_latest[channel] > 0 && this.channels_latest[channel] > 0 &&
(this.channels_unread[channel] === undefined || (this.channels_unread[channel] === undefined ||
@ -315,7 +319,7 @@ class TfTabNewsElement extends LitElement {
class="w3-button w3-hide-large" class="w3-button w3-hide-large"
@click=${this.show_sidebar} @click=${this.show_sidebar}
> >
☰ ${this.unread_status()}☰
</div> </div>
Welcome, <tf-user id=${this.whoami} .users=${this.users}></tf-user>! Welcome, <tf-user id=${this.whoami} .users=${this.users}></tf-user>!
${edit_profile} ${edit_profile}