added theme-changing to edit-panel which was unresponsive previously

This commit is contained in:
silvererudite 2019-10-24 20:42:40 +06:00
parent b54f5334d1
commit 80e81efb94
2 changed files with 14 additions and 2 deletions

View file

@ -21,6 +21,7 @@ function getStyle(themeInfo) {
document.getElementById('sort-containers-link').style.color=themeInfo.colors.tab_background_text;
}
}

View file

@ -889,6 +889,7 @@ Logic.registerPanel(P_CONTAINERS_EDIT, {
</div>
<div class="container-name truncate-text"></div>
</td>
<td class="edit-container pop-button edit-container-icon">
<img
src="/img/container-edit.svg"
@ -903,15 +904,25 @@ Logic.registerPanel(P_CONTAINERS_EDIT, {
tr.querySelector(".container-name").textContent = identity.name;
tr.querySelector(".edit-container").setAttribute("title", `Edit ${identity.name} container`);
tr.querySelector(".remove-container").setAttribute("title", `Remove ${identity.name} container`);
//document.getElementById("halp").style.backgroundColor="red";
function style(themeInfo){
const tabl= document.getElementsByClassName("userContext-wrapper");
const inner_tabl1=document.getElementsByClassName("edit-container");
const inner_tabl2=document.getElementsByClassName("remove-container");
// eslint-disable-next-line no-var
for (var i = 0; i < tabl.length; i++) {
tabl[i].style.backgroundColor=themeInfo.colors.toolbar;
//inner_tabl1[i].style.backgroundColor=themeInfo.colors.toolbar;
//inner_tabl2[i].style.backgroundColor=themeInfo.colors.toolbar;
tabl[i].style.color=themeInfo.colors.tab_background_text;
}
}
// eslint-disable-next-line no-var
for(var j = 0; j < inner_tabl1.length; j++) {
inner_tabl1[j].style.backgroundColor=themeInfo.colors.toolbar;
inner_tabl2[j].style.backgroundColor=themeInfo.colors.toolbar;
}
}
async function getTheme()
{