ssb: Show connections in the sidebar. Fiddle with tf-user CSS to make it fit.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
2024-12-29 14:54:29 -05:00
parent 571cf5b5b8
commit bb97a8cccc
4 changed files with 42 additions and 32 deletions

View File

@ -366,6 +366,7 @@ class TfElement extends LitElement {
}
async load() {
let start_time = new Date();
let whoami = this.whoami;
let following = await tfrpc.rpc.following([whoami], 2);
let users = {};
@ -383,7 +384,6 @@ class TfElement extends LitElement {
this.channels_unread = JSON.parse(
(await tfrpc.rpc.databaseGet('unread')) ?? '{}'
);
let start_time = new Date();
users = await this.fetch_about(Object.keys(following).sort(), users);
console.log(
'about took',
@ -392,10 +392,9 @@ class TfElement extends LitElement {
Object.keys(users).length,
'users'
);
start_time = new Date();
this.following = Object.keys(following);
this.users = users;
console.log(`load finished ${whoami} => ${this.whoami}`);
console.log(`load finished ${whoami} => ${this.whoami} in ${(new Date() - start_time) / 1000}`);
this.whoami = whoami;
this.loaded = whoami;
}
@ -448,6 +447,7 @@ class TfElement extends LitElement {
.channels_latest=${this.channels_latest}
.channels_unread=${this.channels_unread}
@channelsetunread=${this.channel_set_unread}
.connections=${this.connections}
></tf-tab-news>
`;
} else if (this.tab === 'connections') {