Indicate the local server identity.

This commit is contained in:
2024-05-11 09:33:38 -04:00
parent 385524352c
commit a5004c8ba9
3 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,7 @@ class TfTabConnectionsElement extends LitElement {
connections: {type: Array},
stored_connections: {type: Array},
users: {type: Object},
server_identity: {type: String},
};
}
@ -29,6 +30,9 @@ class TfTabConnectionsElement extends LitElement {
tfrpc.rpc.getStoredConnections().then(function (connections) {
self.stored_connections = connections || [];
});
tfrpc.rpc.getServerIdentity().then(function (identity) {
self.server_identity = identity;
});
}
render_connection_summary(connection) {
@ -179,6 +183,7 @@ class TfTabConnectionsElement extends LitElement {
(x) =>
html`<li class="w3-bar">
<tf-user id=${x} .users=${this.users}></tf-user>
${x == this.server_identity ? html`- 🖥local server` : undefined}
</li>`
)}
</ul>