delete portfolio settings

This commit is contained in:
Justin 2023-03-17 16:50:55 +08:00 committed by GitHub
parent e68401eb51
commit 1ca536dfc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -525,38 +525,20 @@ allFeaturesRemoveBtns.map((value, index) => {
for (let i = 0; i < allFeaturesList[index].length; i++) { for (let i = 0; i < allFeaturesList[index].length; i++) {
var item = allFeaturesList[index][i]; var item = allFeaturesList[index][i];
console.log(item); console.log(item);
if (item.getAttribute("class") == "active") { if ((item.getAttribute("class") == "active") && (index == 0 )){
/* let symbol = item.innerText;
if (item.parentElement.getAttribute("id") == "images-features") { item.remove();
let getImages = JSON.parse(localStorage.getItem("customImages")); uploaded_images = [];
uploaded_GIFs = [];
let filter = getImages.filter( fetch("/deletePortfolioSettings", {
(value) => value.fileName !== item.innerText method: "POST",
); body: JSON.stringify(symbol),
localStorage.setItem("customImages", JSON.stringify(filter)); });
} else if (item.parentElement.getAttribute("id") == "gifs-features") { }
let getGifs = JSON.parse(localStorage.getItem("customGifs")); else if (item.getAttribute("class") == "active") {
let filter = getGifs.filter(
(value) => value.fileName !== item.innerText
);
localStorage.setItem("customGifs", JSON.stringify(filter));
} else if (
item.parentElement.getAttribute("id") == "messages-features"
) {
let getMsgs = JSON.parse(localStorage.getItem("customMsg"));
let filter = getMsgs.filter(
(value) => value.messageName !== item.innerText
);
localStorage.setItem("customMsg", JSON.stringify(filter));
}
else {
*/
item.remove(); item.remove();
uploaded_images = []; uploaded_images = [];
uploaded_GIFs = []; uploaded_GIFs = [];
//}
} }
} }
}); });