diff --git a/apps/ssb.json b/apps/ssb.json index 0ce4dace..5adc0c28 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 74172948..13e41327 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 a865387a..da73d365 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}