mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-07-07 12:11:34 +00:00
Fix update message stacking
This commit is contained in:
parent
04c93fa39b
commit
850822db80
3 changed files with 25 additions and 6 deletions
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fixed:
|
||||||
|
- Update message stacking
|
||||||
|
|
@ -651,18 +651,23 @@ waitForElement([".main-userWidget-box"], ([userWidget]) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
const upd = document.createElement("div");
|
let upd;
|
||||||
upd.classList.add("ellipsis-one-line", "main-type-finale");
|
if (!document.getElementById("dribbblish-update")) {
|
||||||
upd.setAttribute("title", `Changes: ${data.name}`);
|
upd = document.createElement("div");
|
||||||
upd.style.setProperty("color", "var(--spice-button-active)");
|
upd.id = "dribbblish-update";
|
||||||
|
//upd.setAttribute("title", `Changes: ${data.name}`);
|
||||||
|
userWidget.append(upd);
|
||||||
|
userWidget.classList.add("update-avail");
|
||||||
|
} else {
|
||||||
|
upd = document.getElementById("dribbblish-update");
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.DRIBBBLISH_VERSION == "Dev") {
|
if (process.env.DRIBBBLISH_VERSION == "Dev") {
|
||||||
upd.innerText = "Dev version!";
|
upd.innerText = "Dev version!";
|
||||||
} else if (data.tag_name > process.env.DRIBBBLISH_VERSION) {
|
} else if (data.tag_name > process.env.DRIBBBLISH_VERSION) {
|
||||||
upd.innerText = `Theme UPD v${data.tag_name} avail.`;
|
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();
|
new Spicetify.Menu.Item("Update Dribbblish", false, () => window.open("https://github.com/JulienMaille/dribbblish-dynamic-theme/releases/latest", "_blank")).register();
|
||||||
}
|
}
|
||||||
userWidget.append(upd);
|
|
||||||
userWidget.classList.add("update-avail");
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
// Do something for an error here
|
// Do something for an error here
|
||||||
|
|
|
||||||
|
|
@ -812,6 +812,18 @@ li.GlueDropTarget {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#dribbblish-update {
|
||||||
|
color: var(--spice-button-active);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 400;
|
||||||
|
letter-spacing: normal;
|
||||||
|
line-height: 16px;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
/** Rearrange player bar */
|
/** Rearrange player bar */
|
||||||
.main-nowPlayingBar-left {
|
.main-nowPlayingBar-left {
|
||||||
order: 1;
|
order: 1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue