From 9b7c5cbeb13ed68f85b79aaec9fa42061ed4d24a Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 28 Jul 2024 22:30:22 +1200 Subject: [PATCH] add suggested community interfaces --- meshchat.py | 6 ++++ public/index.html | 71 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/meshchat.py b/meshchat.py index 47853c2..947d6d6 100644 --- a/meshchat.py +++ b/meshchat.py @@ -1145,6 +1145,10 @@ class ReticulumMeshChat: value = bool(config["allow_auto_resending_failed_messages_with_attachments"]) self.config.allow_auto_resending_failed_messages_with_attachments.set(value) + if "show_suggested_community_interfaces" in config: + value = bool(config["show_suggested_community_interfaces"]) + self.config.show_suggested_community_interfaces.set(value) + # send config to websocket clients await self.send_config_to_websocket_clients() @@ -1291,6 +1295,7 @@ class ReticulumMeshChat: "last_announced_at": self.config.last_announced_at.get(), "auto_resend_failed_messages_when_announce_received": self.config.auto_resend_failed_messages_when_announce_received.get(), "allow_auto_resending_failed_messages_with_attachments": self.config.allow_auto_resending_failed_messages_with_attachments.get(), + "show_suggested_community_interfaces": self.config.show_suggested_community_interfaces.get(), } # convert audio call to dict @@ -1916,6 +1921,7 @@ class Config: last_announced_at = IntConfig("last_announced_at", None) auto_resend_failed_messages_when_announce_received = BoolConfig("auto_resend_failed_messages_when_announce_received", True) allow_auto_resending_failed_messages_with_attachments = BoolConfig("allow_auto_resending_failed_messages_with_attachments", False) + show_suggested_community_interfaces = BoolConfig("show_suggested_community_interfaces", True) # an announce handler for lxmf.delivery aspect that just forwards to a provided callback diff --git a/public/index.html b/public/index.html index 8e989cd..4653f24 100644 --- a/public/index.html +++ b/public/index.html @@ -1070,6 +1070,50 @@
+ +
+
+
+
Community Interfaces
+
These TCP interfaces serve as a quick way to test Reticulum. We suggest running your own as these may not always be available.
+
+
+ +
+
+
+ +
+
+
RNS Testnet Amsterdam
+
amsterdam.connect.reticulum.network:4965
+
+
+ +
+
+ +
+
+
RNS Testnet BetweenTheBorders
+
betweentheborders.com:4242
+
+
+ +
+
+ +
+
+
@@ -1097,7 +1141,7 @@
@@ -1196,7 +1240,7 @@
- +
Failed Messages
@@ -1224,6 +1268,24 @@
+ +
+
Interfaces
+
+ +
+
+
+ +
+ +
+
When enabled, community interfaces will be shown on the Add Interface page.
+
+ +
+
+
@@ -1856,6 +1918,11 @@ "allow_auto_resending_failed_messages_with_attachments": this.config.allow_auto_resending_failed_messages_with_attachments, }); }, + async onShowSuggestedCommunityInterfacesChange() { + await this.updateConfig({ + "show_suggested_community_interfaces": this.config.show_suggested_community_interfaces, + }); + }, async startNewLXMFConversation() { // ask for destination address