Indicate both the server account and your own accounts in the ssb connections tab.
This commit is contained in:
@ -7,6 +7,7 @@ class TfTabConnectionsElement extends LitElement {
|
||||
return {
|
||||
broadcasts: {type: Array},
|
||||
identities: {type: Array},
|
||||
my_identities: {type: Array},
|
||||
connections: {type: Array},
|
||||
stored_connections: {type: Array},
|
||||
users: {type: Object},
|
||||
@ -21,9 +22,13 @@ class TfTabConnectionsElement extends LitElement {
|
||||
let self = this;
|
||||
this.broadcasts = [];
|
||||
this.identities = [];
|
||||
this.my_identities = [];
|
||||
this.connections = [];
|
||||
this.stored_connections = [];
|
||||
this.users = {};
|
||||
tfrpc.rpc.getIdentities().then(function (identities) {
|
||||
self.my_identities = identities || [];
|
||||
});
|
||||
tfrpc.rpc.getAllIdentities().then(function (identities) {
|
||||
self.identities = identities || [];
|
||||
});
|
||||
@ -182,8 +187,13 @@ class TfTabConnectionsElement extends LitElement {
|
||||
${this.identities.map(
|
||||
(x) =>
|
||||
html`<li class="w3-bar">
|
||||
${x == this.server_identity ?
|
||||
html`<span class="w3-tag w3-medium w3-round w3-theme-l1">🖥 local server</span>` :
|
||||
undefined}
|
||||
${this.my_identities.indexOf(x) != -1 ?
|
||||
html`<span class="w3-tag w3-medium w3-round w3-theme-d1">😎 you</span>` :
|
||||
undefined}
|
||||
<tf-user id=${x} .users=${this.users}></tf-user>
|
||||
${x == this.server_identity ? html`- 🖥local server` : undefined}
|
||||
</li>`
|
||||
)}
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user