From 11c5dad0e619bd7da317a6438213112ba983d6c1 Mon Sep 17 00:00:00 2001 From: patcas Date: Sat, 2 Aug 2025 14:47:22 +0200 Subject: [PATCH 1/5] hotfixes for merge conflict --- app/static/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/static/main.js b/app/static/main.js index 99ff0b4..eaa3719 100644 --- a/app/static/main.js +++ b/app/static/main.js @@ -44,16 +44,16 @@ function start_feature_read(plugin, feature, id) { document.getElementById("results").innerHTML = tablecode } else { - tablecode = '' + tablecode = '
'; Object.keys(data['table'][0]).forEach((element) => tablecode+=''); - tablecode += '' + tablecode += ''; data['table'].forEach((element) => { for(let key in element) { if (key.startsWith('base64_')) { element[key] = ''; } } - tablecode += '' + tablecode += ''; }); // tablecode+=''; // Object.keys(data['table'][0]).forEach((element) => tablecode+=''); From d89fac82b0162cd09dc4a2218da05135ba0b24b2 Mon Sep 17 00:00:00 2001 From: Toni Tanner Date: Mon, 4 Aug 2025 11:24:10 +0200 Subject: [PATCH 2/5] removing redundant slash --- app/plugins/traefik/api_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/plugins/traefik/api_provider.py b/app/plugins/traefik/api_provider.py index 63130ac..6efb20d 100644 --- a/app/plugins/traefik/api_provider.py +++ b/app/plugins/traefik/api_provider.py @@ -38,7 +38,7 @@ def read(id=False): # GET try: if len(mode_data['table']) > 0 and mode_data['table'][0]['is_enabled'] == 'true': screen_host = 'http://ssp:8080' - screen_path = '/plugins/mode/visitor_mode?id=visitor_mode_image' + screen_path = 'plugins/mode/visitor_mode?id=visitor_mode_image' else: screen_host = re.match("^(https?://[^/]+)/(.*)$", screen['url']).groups()[0] screen_path = re.match("^(https?://[^/]+)/(.*)$", screen['url']).groups()[1] From 2ffe920434119b9f7505b2b331d2ab5be36e84bb Mon Sep 17 00:00:00 2001 From: Toni Tanner Date: Mon, 4 Aug 2025 11:39:52 +0200 Subject: [PATCH 3/5] update installer to wtype --- app/plugins/screens/device_install.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/plugins/screens/device_install.py b/app/plugins/screens/device_install.py index 845de4c..cd64e14 100644 --- a/app/plugins/screens/device_install.py +++ b/app/plugins/screens/device_install.py @@ -11,7 +11,7 @@ def read(id=False): # GET return {"text": "This is the Device onboarding script that you can run on e.g. a raspberry pi.
Nothing else to do here.

Open Bash Install Script"} else: script=""" -apt install unclutter xdotool +apt install unclutter xdotool wtype mkdir -p /etc/chromium/policies/managed /etc/chromium/policies/recommended mkdir -p /home/pi/.config/lxsession/LXDE-pi/ @@ -24,11 +24,14 @@ def read(id=False): # GET export XAUTHORITY=/home/pi/.Xauthority export DISPLAY=:0 #xdotool search --onlyvisible --class chromium windowfocus key F5 -xdotool search --onlyvisible --class chromium windowfocus key ctrl+t +#xdotool search --onlyvisible --class chromium windowfocus key ctrl+t +wtype -M ctrl -P t sleep 2 -xdotool search --onlyvisible --class chromium windowfocus key ctrl+Tab +#xdotool search --onlyvisible --class chromium windowfocus key ctrl+Tab +wtype -M ctrl -P tab sleep 30 -xdotool search --onlyvisible --class chromium windowfocus key ctrl+w +#xdotool search --onlyvisible --class chromium windowfocus key ctrl+w +wtype -M ctrl -P w EOL chmod +x /home/pi/refresh.sh From a42aa75cad5a2216825adc575a297825c72c8763 Mon Sep 17 00:00:00 2001 From: Toni Tanner Date: Mon, 4 Aug 2025 13:01:13 +0200 Subject: [PATCH 4/5] untested - wayland based autostart installer --- app/plugins/screens/device_install.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/app/plugins/screens/device_install.py b/app/plugins/screens/device_install.py index cd64e14..3711f88 100644 --- a/app/plugins/screens/device_install.py +++ b/app/plugins/screens/device_install.py @@ -43,20 +43,10 @@ def read(id=False): # GET crontab -u root mycron rm mycron - -cat > /home/pi/.config/lxsession/LXDE-pi/autostart < /home/pi/.config/labwc/autostart < Date: Tue, 5 Aug 2025 16:08:45 +0200 Subject: [PATCH 5/5] Update device_install.py --- app/plugins/screens/device_install.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/plugins/screens/device_install.py b/app/plugins/screens/device_install.py index 3711f88..40e15ec 100644 --- a/app/plugins/screens/device_install.py +++ b/app/plugins/screens/device_install.py @@ -23,15 +23,15 @@ def read(id=False): # GET #!/bin/bash export XAUTHORITY=/home/pi/.Xauthority export DISPLAY=:0 -#xdotool search --onlyvisible --class chromium windowfocus key F5 -#xdotool search --onlyvisible --class chromium windowfocus key ctrl+t -wtype -M ctrl -P t +# open new tab loading the default page again +wtype -M ctrl -P t -p t -m ctrl sleep 2 -#xdotool search --onlyvisible --class chromium windowfocus key ctrl+Tab -wtype -M ctrl -P tab +# switch back to old tab, new tab is invisible +wtype -M ctrl -P tab -p tab -m ctrl +# wait for new tab to load sleep 30 -#xdotool search --onlyvisible --class chromium windowfocus key ctrl+w -wtype -M ctrl -P w +# kill old tab, new one will be showing again +wtype -M ctrl -P w -p w -m ctrl EOL chmod +x /home/pi/refresh.sh
'+element.niceify()+'
'+Object.values(element).join('')+'EditDelete
'+Object.values(element).join('')+'EditDelete
NEW