diff --git a/wled00/data/settings_ui.htm b/wled00/data/settings_ui.htm index 90beb592..7505e034 100644 --- a/wled00/data/settings_ui.htm +++ b/wled00/data/settings_ui.htm @@ -27,7 +27,8 @@ "tab":"Button opacity" }, "bg":{ - "url":"BG image URL" + "url":"BG image URL", + "random":"Random BG image" }, "color":{ "bg":"BG HEX color" @@ -163,6 +164,24 @@ var f = gId('theme_base'); if (f) f.value = (gId('dm').checked) ? 'light':'dark'; } + + // random BG image + function setRandomBg() { + if (gId("theme_bg_random").checked) { + gId("theme_bg_url").value = "https://picsum.photos/1920/1080"; + } else { + gId("theme_bg_url").value = ""; + } + + } + function checkRandomBg() { + if (gId("theme_bg_url").value === "https://picsum.photos/1920/1080") { + gId("theme_bg_random").checked = true; + } else { + gId("theme_bg_random").checked = false; + } + } + function GetV() { } @@ -197,7 +216,8 @@ :
:
:
- BG image URL: + BG image URL:
+ Random BG image:

diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 2afdab8e..b6c7297f 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -168,7 +168,7 @@ const char PAGE_settings_dmx[] PROGMEM = R"=====()====="; // Autogenerated from wled00/data/settings_ui.htm, do not edit!! const char PAGE_settings_ui[] PROGMEM = R"=====(UI Settings