From 9064dc64aa57ac0b218e1de5873b6fb99ccbad08 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 28 Jul 2024 15:36:37 +1200 Subject: [PATCH] add settings ui --- meshchat.py | 10 ++++++++ public/index.html | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/meshchat.py b/meshchat.py index 1f5c8e9..e39be59 100644 --- a/meshchat.py +++ b/meshchat.py @@ -1136,6 +1136,14 @@ class ReticulumMeshChat: else: self.config.auto_announce_enabled.set(False) + if "auto_resend_failed_messages_when_announce_received" in config: + value = bool(config["auto_resend_failed_messages_when_announce_received"]) + self.config.auto_resend_failed_messages_when_announce_received.set(value) + + if "allow_auto_resending_failed_messages_with_attachments" in config: + value = bool(config["allow_auto_resending_failed_messages_with_attachments"]) + self.config.allow_auto_resending_failed_messages_with_attachments.set(value) + # send config to websocket clients await self.send_config_to_websocket_clients() @@ -1280,6 +1288,8 @@ class ReticulumMeshChat: "auto_announce_enabled": self.config.auto_announce_enabled.get(), "auto_announce_interval_seconds": self.config.auto_announce_interval_seconds.get(), "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(), } # convert audio call to dict diff --git a/public/index.html b/public/index.html index c1ec99c..1515df7 100644 --- a/public/index.html +++ b/public/index.html @@ -127,6 +127,19 @@ + +
  • + +
  • +