Fix update message stacking for real this time

This commit is contained in:
Send_Nukez 2021-10-28 18:45:05 +02:00
parent 7ae4018432
commit 483c8051eb
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,2 @@
Fixed:
- Update message stacking

View file

@ -657,16 +657,20 @@ waitForElement([".main-userWidget-box"], ([userWidget]) => {
upd.id = "dribbblish-update";
//upd.setAttribute("title", `Changes: ${data.name}`);
userWidget.append(upd);
userWidget.classList.add("update-avail");
} else {
upd = document.getElementById("dribbblish-update");
}
upd.style.display = "block";
userWidget.classList.add("update-avail");
if (process.env.DRIBBBLISH_VERSION == "Dev") {
upd.innerText = "Dev version!";
} else if (data.tag_name > process.env.DRIBBBLISH_VERSION) {
upd.innerText = `Theme UPD v${data.tag_name} avail.`;
new Spicetify.Menu.Item("Update Dribbblish", false, () => window.open("https://github.com/JulienMaille/dribbblish-dynamic-theme/releases/latest", "_blank")).register();
} else {
userWidget.classList.remove("update-avail");
upd.style.display = "none";
}
})
.catch((err) => {