From e756a7e9b9d4ba4aa91cec0fa016148c65c744b8 Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Tue, 13 Oct 2026 15:30:53 +0000 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20debug=20page=20Info=20switch=20?= =?UTF-8?q?=E2=80=94=20hide=20the=20cell=20info,=20header=20and=20snapshot?= =?UTF-8?q?=20only=20(#141)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- .../main/java/com/openipc/decoder/DebugServer.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/openipc/decoder/DebugServer.java b/android/app/src/main/java/com/openipc/decoder/DebugServer.java index 80079536..6a67ba45 100644 --- a/android/app/src/main/java/com/openipc/decoder/DebugServer.java +++ b/android/app/src/main/java/com/openipc/decoder/DebugServer.java @@ -398,7 +398,8 @@ private static void closeQuietly(Socket s) { * and the snapshot filling the rest with the text of each cell drawn over it; on a narrow * screen the snapshot takes the full width and the cells are listed below it (#103). It * fetches /stats.json every 1.5 s and the snapshot (without labels) every 3, 5 or 10 s, - * both only while the tab is visible (#98). + * both only while the tab is visible (#98). The Info switch hides the text over the cells + * and the list, leaving the header and the snapshot (#141). */ private static final String PAGE = "\n" + "*,body.clean #list{display:none!important}" + + "body.clean .cell{border-color:transparent}" + "" + "
" + "
OpenIPC Decoder" @@ -457,6 +461,8 @@ private static void closeQuietly(Socket s) { + " id=\"up\">
" + "" @@ -530,6 +536,12 @@ private static void closeQuietly(Socket s) { + "try{localStorage.setItem('every',every)}catch(x){}};mark();\n" + "var img=$('snap');img.onload=img.onerror=function(){later(snap,every*1000)};\n" + "function snap(){img.src='/snapshot.jpg?labels=0&t='+Date.now()}\n" + // Info on or off (#141), remembered like the interval + + "var shown=1,iseg=$('info');try{shown=localStorage.getItem('info')==='0'?0:1}catch(x){}\n" + + "function imark(){[].forEach.call(iseg.children,function(b){b.className=+b.value===sh" + + "own?'on':''});document.body.classList.toggle('clean',!shown)}\n" + + "iseg.onclick=function(e){if(!e.target.value)return;shown=+e.target.value;imark();" + + "try{localStorage.setItem('info',shown)}catch(x){}};imark();\n" + "later(tick,0);later(snap,0);\n" + "\n"; } From 3d06187415c6052a143569006d6313febad483f3 Mon Sep 17 00:00:00 2001 From: Compot Developer Date: Tue, 13 Oct 2026 15:43:06 +0000 Subject: [PATCH 2/2] fix: debug page header controls wrap on a narrow screen (Qodo on #142) Co-Authored-By: Claude --- .../app/src/main/java/com/openipc/decoder/DebugServer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/openipc/decoder/DebugServer.java b/android/app/src/main/java/com/openipc/decoder/DebugServer.java index 6a67ba45..96919e9d 100644 --- a/android/app/src/main/java/com/openipc/decoder/DebugServer.java +++ b/android/app/src/main/java/com/openipc/decoder/DebugServer.java @@ -417,8 +417,9 @@ private static void closeQuietly(Socket s) { + ".meta{display:flex;flex-wrap:wrap;gap:4px 14px;color:#999;font-size:13px;" + "font-variant-numeric:tabular-nums}" + ".meta span{white-space:nowrap}#err{color:#ff5a5a}" - + "nav{display:flex;align-items:center;gap:6px;margin-left:auto;white-space:nowrap;" - + "font-size:13px;color:#999}" + // The controls wrap as groups on a narrow screen, none goes off it (Qodo on #142) + + "nav{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-left:auto;" + + "font-size:13px;color:#999}nav>*{white-space:nowrap}" + ".btn,.seg button{font:inherit;color:#cde;background:#222;border:1px solid #363636;" + "border-radius:6px;padding:3px 10px;text-decoration:none;cursor:pointer}" + ".btn:hover,.seg button:hover{background:#2c2c2c}"