professional diaply working

This commit is contained in:
Neythen
2021-11-22 19:08:14 +00:00
parent 9d9306245e
commit e1e17d0df2
24 changed files with 148 additions and 91 deletions

View File

@@ -794,11 +794,38 @@ allFeaturesTextAddBtn.map((value, index) => {
var startButton = document.getElementById("start-btn");
// start the display
startButton.addEventListener("click", () => {
var HTML = document.getElementById("display-format").innerHTML;
fetch("/start", {
method: "PUT",
body: JSON.stringify(HTML),
});
let opt = getSelected(displayFormats);
if (opt.includes("Standard")) {
var list_el = document.getElementById("display-format");
let features = getListItems(list_el);
fetch("/start", {
method: "PUT",
body: JSON.stringify(features),
});
} else if (opt.includes("Professional")) {
var top_list_el = document.getElementById("display-format");
let top_features = getListItems(top_list_el);
var bot_list_el = document.getElementById("display-format-2");
let bot_features = getListItems(bot_list_el);
let features = [top_features, bot_features];
fetch("/start", {
method: "PUT",
body: JSON.stringify(features),
});
}
});
var brightnessButton = document.getElementById("brightness-btn");