From 45b97e8028952943e7d5fd96ef4c6712760ceb20 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 18 Dec 2025 23:51:48 +0100 Subject: [PATCH] PixelForge adaptations for version 14.x * different call for listing images * different call for deleting images * minor cleanups --- tools/cdata.js | 2 +- wled00/data/pixelforge/pixelforge.htm | 11 +++++++++-- wled00/wled_server.cpp | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/cdata.js b/tools/cdata.js index cd6fcce1..be739978 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -100,7 +100,7 @@ function adoptVersionAndRepo(html) { if (repoUrl) { repoUrl = repoUrl.replace(/^git\+/, ""); repoUrl = repoUrl.replace(/\.git$/, ""); - // html = strReplace(html, "https://github.com/wled-dev/WLED", repoUrl); // replacing upstream break "credits" + // html = html.replaceAll("https://github.com/wled-dev/WLED", repoUrl); // WLEDMM replacing upstream break "credits" html = html.replaceAll("https://github.com/atuline/WLED", repoUrl); html = html.replaceAll("https://github.com/Aircoookie/WLED", repoUrl); } diff --git a/wled00/data/pixelforge/pixelforge.htm b/wled00/data/pixelforge/pixelforge.htm index 81213829..a6c130ed 100644 --- a/wled00/data/pixelforge/pixelforge.htm +++ b/wled00/data/pixelforge/pixelforge.htm @@ -321,6 +321,7 @@ button, .btn { +

Target Segment

@@ -388,6 +389,8 @@ button, .btn {
+ +
@@ -444,7 +447,8 @@ let fL; // file list /* update file list */ async function flU(){ try{ - const r = await fetch(`${wu}/edit?func=list`); + //const r = await fetch(`${wu}/edit?func=list`); + const r = await fetch(`${wu}/edit?list=/`); fL = await r.json(); }catch(e){console.error(e);} } @@ -1097,7 +1101,10 @@ async function imgDel(){ if(!confirm(`Delete ${sI.name}?`))return; ovShow(); try{ - const r = await fetch(`${wu}/edit?func=delete&path=/${sI.name}`); + //const r = await fetch(`${wu}/edit?func=delete&path=/${sI.name}`); + const fd = new FormData(); + fd.append('path', `/${sI.name}`); + const r = await fetch(`${wu}/edit`, {method:'DELETE', body: fd}); if(r.ok){ msg('Deleted'); imgRm(sI.name); } else msg('Delete failed! File in use?','err'); }catch(e){msg('Delete failed','err');} diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 9ae44383..9efcff7d 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -479,8 +479,8 @@ void initServer() //called when the url is not defined here, ajax-in; get-settings server.onNotFound([](AsyncWebServerRequest *request){ - USER_PRINT("Not-Found HTTP call: "); - USER_PRINTLN("URI: " + request->url()); + DEBUG_PRINT("Not-Found HTTP call: "); + DEBUG_PRINTLN("URI: " + request->url()); if (captivePortal(request)) return; //make API CORS compatible