From e67d577205d7c7b326cd82041433bdd8ae5bf63f Mon Sep 17 00:00:00 2001 From: frikky Date: Mon, 6 Sep 2021 19:21:46 +0200 Subject: [PATCH] Added auto-login for shuffle frontend during setup --- backend/app_sdk/app_base.py | 13 ++++-- frontend/src/App.jsx | 2 +- frontend/src/components/ParsedAction.jsx | 39 +--------------- frontend/src/views/Admin.jsx | 8 ++-- frontend/src/views/LoginPage.jsx | 58 ++++++++++++++++++++++-- 5 files changed, 70 insertions(+), 50 deletions(-) diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 59127d03..2617dd9a 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -521,7 +521,7 @@ class AppBase: print("[INFO] Multiplier length: %d" % len(param_multiplier)) #tmp = "" for subparams in param_multiplier: - #print(f"SUBPARAMS IN MULTI: {subparams}") + print(f"SUBPARAMS IN MULTI: {subparams}") try: #tmp = await func(**subparams) @@ -530,6 +530,7 @@ class AppBase: tmp = await func(**subparams) break except TypeError as e: + print("BASE TYPEERROR: %s" % e) errorstring = "%s" % e if "got an unexpected keyword argument" in errorstring: fieldsplit = errorstring.split("'") @@ -2087,26 +2088,30 @@ class AppBase: newvalue = json.loads(action["parameters"][counter]["value"]) deletekeys = [] for key, value in newvalue.items(): - print(key, value) + print("%s: %s" % (key, value)) if isinstance(value, str) and len(value) == 0: deletekeys.append(key) continue if value == "${%s}" % key: - print("Deleting %s because key = value") + print("Deleting %s because key = value" % key) deletekeys.append(key) continue for deletekey in deletekeys: del newvalue[deletekey] - print("Post delete: %s" % newvalue) + #print("Post delete: %s" % newvalue) for key, value in newvalue.items(): + if isinstance(value, bool): + continue + try: value = json.loads(value) newvalue[key] = value except json.decoder.JSONDecodeError as e: print("Inner overwrite issue: %s" % e) + continue action["parameters"][counter]["value"] = json.dumps(newvalue) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 562c154e..3b48175a 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -107,7 +107,7 @@ const App = (message, props) => {
- } /> + } /> } /> } /> } /> diff --git a/frontend/src/components/ParsedAction.jsx b/frontend/src/components/ParsedAction.jsx index 352de397..abcd6309 100644 --- a/frontend/src/components/ParsedAction.jsx +++ b/frontend/src/components/ParsedAction.jsx @@ -1553,44 +1553,7 @@ const ParsedAction = (props) => {
+ }