From 2e2814a2ffe254307d93bbaab6410dcf76a38b86 Mon Sep 17 00:00:00 2001
From: suddencoffee <106411847+suddencoffee@users.noreply.github.com>
Date: Tue, 7 Jan 2025 17:23:09 -0500
Subject: [PATCH 1/3] Update index.html to propagate_mode
Signed-off-by: suddencoffee <106411847+suddencoffee@users.noreply.github.com>
---
nutcase/app/app/templates/main/index.html | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nutcase/app/app/templates/main/index.html b/nutcase/app/app/templates/main/index.html
index b89d824..40d8c85 100755
--- a/nutcase/app/app/templates/main/index.html
+++ b/nutcase/app/app/templates/main/index.html
@@ -318,6 +318,9 @@
Warning
if (data.device) {
Device = data.device;
}
+ if (data.mode) {
+ Mode = data.mode;
+ }
if (data.addr) {
Addr = data.addr;
if (data.port) {
From 68bd2b2598595f0108c91a94cf7aae0fea85e8d7 Mon Sep 17 00:00:00 2001
From: suddencoffee <106411847+suddencoffee@users.noreply.github.com>
Date: Tue, 7 Jan 2025 17:26:08 -0500
Subject: [PATCH 2/3] Update routes.py to return mode in /default route
Signed-off-by: suddencoffee <106411847+suddencoffee@users.noreply.github.com>
From 524338011b9471fa17e7a507b9301080b90bff8b Mon Sep 17 00:00:00 2001
From: suddencoffee <106411847+suddencoffee@users.noreply.github.com>
Date: Tue, 7 Jan 2025 17:27:49 -0500
Subject: [PATCH 3/3] Update /default route to return mode in response
Signed-off-by: suddencoffee <106411847+suddencoffee@users.noreply.github.com>
---
nutcase/app/app/api/routes.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nutcase/app/app/api/routes.py b/nutcase/app/app/api/routes.py
index 5c9bb03..1c50294 100755
--- a/nutcase/app/app/api/routes.py
+++ b/nutcase/app/app/api/routes.py
@@ -58,6 +58,8 @@ def route_default():
Result['addr'] = s['server']
Result['port'] = s['port']
Result['device'] = d['device']
+ if 'mode' in d:
+ Result['mode'] = d['mode']
if 'default' in d:
if d['default']:
print("route default: return {} as default".format(d))