mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-20 15:11:14 +00:00
Compare commits
21 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77182042dd | ||
|
|
7492c86124 | ||
|
|
55693078f6 | ||
|
|
2c8dea7f5d | ||
|
|
6d23932d0b | ||
|
|
d7e355bf46 | ||
|
|
c9ec3971ad | ||
|
|
bb7017960b | ||
|
|
1064087b48 | ||
|
|
3edfc3fa6b | ||
|
|
239033ad5e | ||
|
|
145cfe9b53 | ||
|
|
2e55b23b44 | ||
|
|
8c5a45c64a | ||
|
|
8d9cdf3df5 | ||
|
|
9f5a988eca | ||
|
|
167e253a86 | ||
|
|
ba5846bc41 | ||
|
|
d687a13cb7 | ||
|
|
33134709ed | ||
|
|
13e1f64054 |
8 changed files with 87 additions and 45 deletions
21
.github/workflows/stale.yml
vendored
Normal file
21
.github/workflows/stale.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stalled for 15 days with no activity.'
|
||||
days-before-issue-stale: 60
|
||||
days-before-pr-stale: 60
|
||||
days-before-issue-close: 7
|
||||
days-before-pr-close: 15
|
||||
operations-per-run: 100
|
||||
ascending: true
|
||||
|
|
@ -4,6 +4,7 @@ Added:
|
|||
|
||||
Fixed:
|
||||
- Custom search input not being focussed after clicking
|
||||
- When changing songs, the color shifts to blue for a second (#179)
|
||||
|
||||
Improved:
|
||||
- Add `embedWidgetGenerator` modals to custom modal styles. (Things like the [spicetify-marketplace](https://github.com/CharlieS1103/spicetify-marketplace) options)
|
||||
|
|
|
|||
|
|
@ -117,12 +117,12 @@ xpui.js_repl_8008=,`${1}58,
|
|||
|
||||
Write-Part "APPLYING";
|
||||
$backupVer = $configFile -match "^version"
|
||||
$version = ConvertFrom-StringData $backupVer[0]
|
||||
if ($version.version.Length -gt 0) {
|
||||
if ($backupVer.Length -gt 0) {
|
||||
spicetify apply
|
||||
} else {
|
||||
spicetify backup apply
|
||||
}
|
||||
Write-Done
|
||||
}
|
||||
else {
|
||||
Write-Part "`nYour Powershell version is less than "; Write-Emphasized "$PSMinVersion";
|
||||
|
|
|
|||
40
package-lock.json
generated
40
package-lock.json
generated
|
|
@ -13,9 +13,9 @@
|
|||
"jquery": "^3.6.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.defaultsdeep": "^4.6.1",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it": "^12.3.2",
|
||||
"markdown-it-attrs": "^4.1.0",
|
||||
"moment": "^2.29.1",
|
||||
"moment": "^2.29.2",
|
||||
"node-vibrant": "^3.1.6",
|
||||
"svgson": "^5.2.1"
|
||||
},
|
||||
|
|
@ -3752,9 +3752,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/markdown-it": {
|
||||
"version": "12.2.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.2.0.tgz",
|
||||
"integrity": "sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==",
|
||||
"version": "12.3.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
|
||||
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "~2.1.0",
|
||||
|
|
@ -3848,9 +3848,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
|
||||
},
|
||||
"node_modules/mkdirp": {
|
||||
"version": "0.5.5",
|
||||
|
|
@ -3864,9 +3864,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
|
||||
"version": "2.29.2",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz",
|
||||
"integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
|
|
@ -8024,9 +8024,9 @@
|
|||
}
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "12.2.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.2.0.tgz",
|
||||
"integrity": "sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==",
|
||||
"version": "12.3.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
|
||||
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "~2.1.0",
|
||||
|
|
@ -8094,9 +8094,9 @@
|
|||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.5",
|
||||
|
|
@ -8107,9 +8107,9 @@
|
|||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
|
||||
"version": "2.29.2",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz",
|
||||
"integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@
|
|||
"jquery": "^3.6.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.defaultsdeep": "^4.6.1",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it": "^12.3.2",
|
||||
"markdown-it-attrs": "^4.1.0",
|
||||
"moment": "^2.29.1",
|
||||
"moment": "^2.29.2",
|
||||
"node-vibrant": "^3.1.6",
|
||||
"svgson": "^5.2.1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -460,8 +460,8 @@ Dribbblish.on("ready", () => {
|
|||
|
||||
/* js */
|
||||
async function getAlbumRelease(uri) {
|
||||
const info = await Spicetify.CosmosAsync.get(`hm://album/v1/album-app/album/${uri}/desktop`);
|
||||
return { year: info.year, month: (info.month ?? 1) - 1, day: info.day ?? 1 };
|
||||
const info = await Spicetify.CosmosAsync.get(`https://api.spotify.com/v1/albums/${uri}`);
|
||||
return { year: info.release_date };
|
||||
}
|
||||
|
||||
async function getGenres(uri) {
|
||||
|
|
@ -754,16 +754,17 @@ Dribbblish.on("ready", () => {
|
|||
|
||||
if (!document.getElementById("main-trackInfo-genre")) {
|
||||
const el = document.createElement("div");
|
||||
el.classList.add("standalone-ellipsis-one-line", "main-type-finale");
|
||||
el.classList.add("main-trackInfo-release", "standalone-ellipsis-one-line", "main-type-finale");
|
||||
el.setAttribute("as", "div");
|
||||
el.id = "main-trackInfo-genre";
|
||||
document.querySelector(".main-trackInfo-container").append(el);
|
||||
}
|
||||
const genreInfoSpan = document.getElementById("main-trackInfo-genre");
|
||||
|
||||
let album_uri = Spicetify.Player.data.track.metadata.album_uri;
|
||||
let artist_uri = Spicetify.Player.data.track.metadata.artist_uri;
|
||||
let bgImage = Spicetify.Player.data.track.metadata.image_url;
|
||||
let track = Spicetify.Player.data.track;
|
||||
let album_uri = track.metadata.album_uri;
|
||||
let artist_uri = track.metadata.artist_uri;
|
||||
let bgImage = track.metadata.image_url;
|
||||
if (bgImage === undefined) {
|
||||
bgImage = "/images/tracklist-row-song-fallback.svg";
|
||||
}
|
||||
|
|
@ -774,31 +775,34 @@ Dribbblish.on("ready", () => {
|
|||
const albumLinkElem = /* html */ `
|
||||
<span>
|
||||
<span draggable="true">
|
||||
<a draggable="false" dir="auto" href="${album_uri}">${Spicetify.Player.data.track.metadata.album_title}</a>
|
||||
<a draggable="false" dir="auto" href="${album_uri}">${track.metadata.album_title}</a>
|
||||
</span>
|
||||
</span>
|
||||
`;
|
||||
const albumDateElem = /* html */ `<span> • <span title="${albumDate.format("L")}">${albumDate.format(moment().diff(albumDate, "months") <= 6 ? "MMM YYYY" : "YYYY")}</span></span>`;
|
||||
albumInfoSpan.innerHTML = `${albumLinkElem}${albumDateElem}`;
|
||||
|
||||
const genres = await getGenres(artist_uri.replace("spotify:artist:", ""));
|
||||
genreInfoSpan.innerHTML = `
|
||||
let genres = "";
|
||||
if (!album_uri.includes("spotify:episode")) {
|
||||
genres = await getGenres(artist_uri.replace("spotify:artist:", ""));
|
||||
}
|
||||
genreInfoSpan.innerHTML = /* html */ `
|
||||
<span>
|
||||
<span draggable="true">
|
||||
<span draggable="false" dir="auto">${genres.join(", ")}</span>
|
||||
</span>
|
||||
</span>
|
||||
`;
|
||||
} else if (Spicetify.Player.data.track.uri.includes("spotify:episode")) {
|
||||
} else if (track.uri.includes("spotify:episode")) {
|
||||
// podcast
|
||||
bgImage = bgImage.replace("spotify:image:", "https://i.scdn.co/image/");
|
||||
albumInfoSpan.innerHTML = Spicetify.Player.data.track.metadata.album_title;
|
||||
albumInfoSpan.innerHTML = track.metadata.album_title;
|
||||
genreInfoSpan.innerHTML = "";
|
||||
} else if (Spicetify.Player.data.track.metadata.is_local == "true") {
|
||||
} else if (track.metadata.is_local == "true") {
|
||||
// local file
|
||||
albumInfoSpan.innerHTML = Spicetify.Player.data.track.metadata.album_title;
|
||||
albumInfoSpan.innerHTML = track.metadata.album_title;
|
||||
genreInfoSpan.innerHTML = "";
|
||||
} else if (Spicetify.Player.data.track.provider == "ad") {
|
||||
} else if (track.provider == "ad") {
|
||||
// ad
|
||||
albumInfoSpan.innerHTML = "Advertisement";
|
||||
genreInfoSpan.innerHTML = "";
|
||||
|
|
@ -821,8 +825,8 @@ Dribbblish.on("ready", () => {
|
|||
|
||||
$("html").css("--image-brightness", getImageLightness(img) / 255);
|
||||
|
||||
let color = "#509bf5";
|
||||
if (img.complete) {
|
||||
let color = "#1ed760";
|
||||
const colorSelectionAlgorithm = Dribbblish.config.get("colorSelectionAlgorithm");
|
||||
const colorSelectionMode = Dribbblish.config.get("colorSelectionMode");
|
||||
let palette = {};
|
||||
|
|
@ -853,9 +857,9 @@ Dribbblish.on("ready", () => {
|
|||
const wantedLuminance = $("html").css("--is_light") == "1" ? Dribbblish.config.get("lightModeLuminance") : Dribbblish.config.get("darkModeLuminance");
|
||||
color = palette[getClosestToNum(Object.keys(palette), wantedLuminance)].hex();
|
||||
}
|
||||
}
|
||||
|
||||
updateColors(false, color);
|
||||
updateColors(false, color);
|
||||
}
|
||||
}
|
||||
|
||||
var coverListener;
|
||||
|
|
@ -887,7 +891,7 @@ Dribbblish.on("ready", () => {
|
|||
fetch("https://api.github.com/repos/JulienMaille/dribbblish-dynamic-theme/releases/latest")
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
Dribbblish.info.set("dribbblish-update", data.tag_name > process.env.DRIBBBLISH_VERSION ? { text: `v${data.tag_name}`, tooltip: "Nev Dribbblish version available", icon: "palette", onClick: () => window.open("https://github.com/JulienMaille/dribbblish-dynamic-theme/releases/latest", "_blank") } : null);
|
||||
Dribbblish.info.set("dribbblish-update", data.tag_name > process.env.DRIBBBLISH_VERSION ? { text: `v${data.tag_name}`, tooltip: "New Dribbblish version available", icon: "palette", onClick: () => window.open("https://github.com/JulienMaille/dribbblish-dynamic-theme/releases/latest", "_blank") } : null);
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
--scrollbar-vertical-size: 8px;
|
||||
--cover-border-radius: 8px;
|
||||
--playbar-movement-anim-speed: 0.5s;
|
||||
--image-radius: 10px;
|
||||
--image-radius: 4px;
|
||||
--sidebar-icons-border-radius: 50vh; // 50vh = round / pill
|
||||
--song-transition-speed: 3s;
|
||||
--is_dark: calc(1 - var(--is_light));
|
||||
|
|
@ -150,8 +150,12 @@
|
|||
background-color: var(--spice-main);
|
||||
}
|
||||
|
||||
.main-trackList-active {
|
||||
background-color: spiceColor("selected-row", 0.25) !important;
|
||||
}
|
||||
|
||||
.main-trackList-trackListRow:hover {
|
||||
background-color: spiceColor("selected-row", 0.2) !important;
|
||||
background-color: spiceColor("selected-row", 0.15) !important;
|
||||
}
|
||||
|
||||
.main-trackList-trackListRow:focus-within,
|
||||
|
|
@ -166,6 +170,11 @@ span.artist-artistVerifiedBadge-badge svg > path:last-of-type {
|
|||
fill: spiceColor("text");
|
||||
}
|
||||
|
||||
/* Playlist text color */
|
||||
.main-entityHeader-subtitle.main-entityHeader-gra {
|
||||
color: spiceColor("subtext");
|
||||
}
|
||||
|
||||
/* Full window artist background */
|
||||
.main-entityHeader-background.main-entityHeader-gradient {
|
||||
opacity: 0.3;
|
||||
|
|
@ -567,7 +576,7 @@ html.sidebar-hide-text .GlueDropTarget span {
|
|||
|
||||
.progress-bar {
|
||||
--progress-bar-height: 2px;
|
||||
--is-active-fg-color: #{spiceColor("subtext")};
|
||||
--is-active-fg-color: #{spiceColor("button-active")};
|
||||
--fg-color: #{spiceColor("button")};
|
||||
--bg-color: #{spiceColor("text", 0.2)};
|
||||
}
|
||||
|
|
@ -1330,6 +1339,13 @@ canvas[width="250"][height="250"] {
|
|||
font-size: 10px;
|
||||
}
|
||||
|
||||
// fix play buttons color going green (#174)
|
||||
.encore-bright-accent-set {
|
||||
--background-highlight: var(--spice-button) !important;
|
||||
--background-press: var(--spice-button-active) !important;
|
||||
color: var(--spice-sidebar-text);
|
||||
}
|
||||
|
||||
// hide the triangle under the connect button
|
||||
.control-button--active::after {
|
||||
display: none;
|
||||
|
|
|
|||
Loading…
Reference in a new issue