Added more settings

This commit is contained in:
nutty
2026-06-28 04:06:45 +10:00
parent a52b07fccc
commit 9e175e2ac7
10 changed files with 144 additions and 78 deletions
+7 -15
View File
@@ -30,24 +30,16 @@ const durationLabel = document.getElementById('duration');
// PAGE SETUP //
////////////////
// Set property visibility
trackLabel.style.display = showPrimary ? '' : 'none';
artistLabel.style.display = showSecondary ? '' : 'none';
// Set container width
if (maxWidth > 0)
mainWrapper.style.width = `${maxWidth}px`;
else
mainWrapper.style.width = `100%`;
// Set album art style
switch (albumArt)
{
case 'none':
albumArtContainer.style.display = 'none';
break;
case 'show':
albumArtContainer.style.display = '';
break;
case 'spinny':
break;
}
// Set progress bar visibility
if (!showProgressBar)
progressContainer.style.display = 'none';
@@ -172,8 +164,8 @@ async function ChangeTrack(mediaProps, tintColor) {
// Wait for fade (0.5s), then swap the real text and hide overlay
setTimeout(async () => {
trackLabel.innerText = mediaProps.Title;
artistLabel.innerText = mediaProps.Artist;
trackLabel.innerText = swapArtistTrack ? mediaProps.Artist : mediaProps.Title;
artistLabel.innerText = swapArtistTrack ? mediaProps.Title : mediaProps.Artist;
// Extract the image source string (use fallback if Windows has no art)
const newArtUrl = mediaProps.Base64Image;
+5 -2
View File
@@ -16,6 +16,7 @@
position: relative;
background-size: cover;
background-position: center;
display: var(--show-album-art);
}
#album-art-layer,
@@ -89,19 +90,21 @@
#track-label {
font-size: 1em;
font-weight: 600;
text-align: var(--text-alignment);
}
#artist-label {
font-size: 0.8em;
font-weight: 300;
opacity: 0.6;
text-align: var(--text-alignment);
}
.text-label {
white-space: nowrap;
overflow: hidden;
mask-image: linear-gradient(to right, black calc(100% - 1em), transparent 100%);
-webkit-mask-image: linear-gradient(to right, black calc(100% - 1em), transparent 100%);
mask-image: var(--trailing-fade);
-webkit-mask-image: var(--trailing-fade);
transition: opacity 0.25s ease-in-out;
}