New custom palettes editor (#5010)
* full refactoring, added live preview, better minifying in cdata.js * update main UI buttons, support for gaps in cpal files, cpal UI cleanup * fixed some layout issues, added un-ordered cpal deletion * changed to tab indentation, paste button border color now holds stored color * fix preview to work properly and some other fixes in UI * always unfreeze * new approach to loading iro.js, add harmonic random palette, many fixes. * decoupling iro.j, update UI of cpal.htm - load iro.js sequentially - no parallel requests in cpal.htm - update UI buttons - fix showing sequential loading of palettes (using opacity) - better UX for mobile (larger markers, larger editor) - various fixes * small change to buttons * load iro.js dynamically, remove iro.js from index.htm, revert changes to cdata.js * improved visibility for very dark/black palettes and markers
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "html_ui.h"
|
||||
#include "html_settings.h"
|
||||
#include "html_other.h"
|
||||
#include "js_iro.h"
|
||||
#ifdef WLED_ENABLE_PIXART
|
||||
#include "html_pixart.h"
|
||||
#endif
|
||||
@@ -36,6 +37,7 @@ static const char s_cache_control[] PROGMEM = "Cache-Control";
|
||||
static const char s_no_store[] PROGMEM = "no-store";
|
||||
static const char s_expires[] PROGMEM = "Expires";
|
||||
static const char _common_js[] PROGMEM = "/common.js";
|
||||
static const char _iro_js[] PROGMEM = "/iro.js";
|
||||
|
||||
|
||||
//Is this an IP?
|
||||
@@ -350,6 +352,10 @@ void initServer()
|
||||
handleStaticContent(request, FPSTR(_common_js), 200, FPSTR(CONTENT_TYPE_JAVASCRIPT), JS_common, JS_common_length);
|
||||
});
|
||||
|
||||
server.on(_iro_js, HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
handleStaticContent(request, FPSTR(_iro_js), 200, FPSTR(CONTENT_TYPE_JAVASCRIPT), JS_iro, JS_iro_length);
|
||||
});
|
||||
|
||||
//settings page
|
||||
server.on(F("/settings"), HTTP_GET, [](AsyncWebServerRequest *request){
|
||||
serveSettings(request);
|
||||
|
||||
Reference in New Issue
Block a user