mirror of
https://github.com/morpheusthewhite/spicetify-themes.git
synced 2024-11-22 02:42:54 +01:00
add: connect bar state
fix: elapsed time text fix: bookmark select box text color
This commit is contained in:
parent
89bc66b613
commit
7b2a5eb5b2
@ -140,8 +140,9 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
|
||||
|
||||
(function Dribbblish() {
|
||||
const progBar = document.querySelector(".playback-bar");
|
||||
const root = document.querySelector(".Root");
|
||||
|
||||
if (!Spicetify.Player.origin || !progBar) {
|
||||
if (!Spicetify.Player.origin || !progBar || !root) {
|
||||
setTimeout(Dribbblish, 300);
|
||||
return;
|
||||
}
|
||||
@ -152,7 +153,7 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
|
||||
|
||||
const progKnob = progBar.querySelector(".progress-bar__slider");
|
||||
|
||||
Spicetify.Player.addEventListener("onprogress", ({ data: e }) => {
|
||||
function updateProgTime({ data: e }) {
|
||||
const offsetX = progKnob.offsetLeft + progKnob.offsetWidth / 2;
|
||||
const maxWidth = progBar.offsetWidth;
|
||||
const curWidth = Spicetify.Player.getProgressPercent() * maxWidth;
|
||||
@ -166,6 +167,17 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
|
||||
}
|
||||
tooltip.innerText = Spicetify.Player.formatTime(e) + " / " +
|
||||
Spicetify.Player.formatTime(Spicetify.Player.getDuration());
|
||||
}
|
||||
Spicetify.Player.addEventListener("onprogress", updateProgTime);
|
||||
updateProgTime({ data: Spicetify.Player.getProgress() });
|
||||
|
||||
Spicetify.CosmosAsync.sub("sp://connect/v1", (state) => {
|
||||
const isExternal = state.devices.some(a => a.is_active);
|
||||
if (isExternal) {
|
||||
root.classList.add("is-connectBarVisible");
|
||||
} else {
|
||||
root.classList.remove("is-connectBarVisible");
|
||||
}
|
||||
});
|
||||
|
||||
const filePickerForm = document.createElement("form");
|
||||
|
@ -817,6 +817,9 @@ html.right-expanded-cover.buddyfeed-visible .main-coverSlotExpanded-container {
|
||||
background-color: rgba(var(--spice-rgb-selected-row), .3);
|
||||
}
|
||||
|
||||
.bookmark-filter {
|
||||
color: var(--spice-main) !important;
|
||||
}
|
||||
|
||||
/* 1.1.56 */
|
||||
.main-navBar-navBar {
|
||||
|
Loading…
Reference in New Issue
Block a user