diff --git a/apps/ssb/tf-tab-connections.js b/apps/ssb/tf-tab-connections.js index a610a101..b51b4d7f 100644 --- a/apps/ssb/tf-tab-connections.js +++ b/apps/ssb/tf-tab-connections.js @@ -42,11 +42,8 @@ class TfTabConnectionsElement extends LitElement { let self = this; let peers = this.broadcasts.filter(x => x.tunnel?.id == connection); if (peers.length) { - return html` - - `; + let connections = this.connections.map(x => x.id); + return html`${peers.filter(x => connections.indexOf(x.pubkey) == -1).map(x => html`${self.render_room_peer(x)}`)}`; } } @@ -59,7 +56,7 @@ class TfTabConnectionsElement extends LitElement { return html`
  • self._tunnel(connection.tunnel.id, connection.pubkey)} value="Connect"> - + 📡
  • `; } @@ -79,6 +76,18 @@ class TfTabConnectionsElement extends LitElement { this.stored_connections = (await tfrpc.rpc.getStoredConnections()) || []; } + render_connection(connection) { + return html` + tfrpc.rpc.closeConnection(connection.id)} value="Close"> + + ${connection.tunnel !== undefined ? '🚇' : html`(${connection.host}:${connection.port})`} + + `; + } + render() { let self = this; return html` @@ -93,12 +102,8 @@ class TfTabConnectionsElement extends LitElement {

    Connections

    Stored Connections (WIP)