From 0f8687e4735a4c069aa740f826e912282eeb9544 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 29 Oct 2025 12:40:28 -0400 Subject: [PATCH] ssb: Improve peer exchange wording. --- apps/ssb.json | 2 +- apps/ssb/tf-tab-connections.js | 31 +++++++++++++++++++++++++++++++ apps/ssb/tf-tab-news.js | 4 ++-- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 0ce4dacee..5adc0c283 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&yw1a+Mxb3+vFtzEQijo6Ty0Z+HkBC36XpfZQRlJ2PaQ=.sha256" + "previous": "&Gic1e3jOZ7z5131jSCclbFXRpjyu8JlWJrjE7Fvn5dc=.sha256" } diff --git a/apps/ssb/tf-tab-connections.js b/apps/ssb/tf-tab-connections.js index 741729483..13e413273 100644 --- a/apps/ssb/tf-tab-connections.js +++ b/apps/ssb/tf-tab-connections.js @@ -15,6 +15,7 @@ class TfTabConnectionsElement extends LitElement { connect_attempt: {type: Object}, connect_message: {type: String}, connect_success: {type: Boolean}, + peer_exchange: {type: Boolean}, }; } @@ -47,6 +48,20 @@ class TfTabConnectionsElement extends LitElement { tfrpc.rpc.getServerIdentity().then(function (identity) { self.server_identity = identity; }); + this.check_peer_exchange(); + } + + async check_peer_exchange() { + if (await tfrpc.rpc.isAdministrator()) { + this.peer_exchange = await tfrpc.rpc.globalSettingsGet('peer_exchange'); + } else { + this.peer_exchange = undefined; + } + } + + async enable_peer_exchange() { + await tfrpc.rpc.globalSettingsSet('peer_exchange', true); + await this.check_peer_exchange(); } render_connection_summary(connection) { @@ -255,6 +270,22 @@ class TfTabConnectionsElement extends LitElement { ${generate_theme()}
+
+

+ Looking for connections? Enabling this option will include publicly + advertised rooms and pubs among the list of discovered connections + to help you replicate. +

+ +

New Connection

${this.render_message(this.renderRoot.getElementById('code')?.value)} diff --git a/apps/ssb/tf-tab-news.js b/apps/ssb/tf-tab-news.js index a865387a8..da73d365e 100644 --- a/apps/ssb/tf-tab-news.js +++ b/apps/ssb/tf-tab-news.js @@ -322,11 +322,11 @@ class TfTabNewsElement extends LitElement { ${this.stay_connected ? 'Online mode' : 'Passive mode'} ` : undefined}