From 9b00b41a1eeaf5a1b9ab6c2fc78b3a0d00043c5b Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 11 Nov 2024 22:24:54 -0500 Subject: [PATCH] ssb: Connection result preliminary hookup to ui, and fix some fallout. --- apps/ssb.json | 2 +- apps/ssb/tf-tab-connections.js | 13 ++++++++++++- src/ssb.c | 8 ++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 95c5e7ab..35365dc2 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🐌", - "previous": "&0ZjcRFTyAmJMm3qhqKy5Ffrue23G1CAUfc1i2WYZrzQ=.sha256" + "previous": "&+UZSxjoucLAl5r/nfRNu5KXx3K/PdutGnizL/Cn2eCU=.sha256" } diff --git a/apps/ssb/tf-tab-connections.js b/apps/ssb/tf-tab-connections.js index 7bcd8c35..1cc34e51 100644 --- a/apps/ssb/tf-tab-connections.js +++ b/apps/ssb/tf-tab-connections.js @@ -12,6 +12,7 @@ class TfTabConnectionsElement extends LitElement { stored_connections: {type: Array}, users: {type: Object}, server_identity: {type: String}, + connect_error: {type: String}, }; } @@ -163,6 +164,15 @@ class TfTabConnectionsElement extends LitElement { tfrpc.rpc.sync(); } + connect(address) { + let self = this; + tfrpc.rpc.connect(address).then(function() { + self.connect_error = 'connected!'; + }).catch(function(error) { + self.connect_error = error; + }); + } + render() { let self = this; return html` @@ -178,10 +188,11 @@ class TfTabConnectionsElement extends LitElement { +
${this.connect_error}

Broadcasts