From d031c44a4060484b4fa3c47f15b3d1b292a77b41 Mon Sep 17 00:00:00 2001 From: ap5z <252674497+ap5z@users.noreply.github.com> Date: Mon, 6 Apr 2026 03:47:25 +0000 Subject: [PATCH] style: auto-fix linting issues --- index.html | 19 ++++++++++++++++--- js/ui.js | 15 +++++++++++---- styles.css | 44 +++++++++++++++++++------------------------- 3 files changed, 46 insertions(+), 32 deletions(-) diff --git a/index.html b/index.html index 605a632..6d91859 100644 --- a/index.html +++ b/index.html @@ -206,7 +206,11 @@ " > - + @@ -261,7 +265,11 @@ - + 0:00 @@ -285,7 +293,12 @@ - + Auto diff --git a/js/ui.js b/js/ui.js index da78079..b5ac06c 100644 --- a/js/ui.js +++ b/js/ui.js @@ -1336,7 +1336,9 @@ export class UIRenderer { nextTrackEl.classList.remove('animate-in'); } - const canRenderLyrics = Boolean(lyricsManager && activeElement && lyricsPane && lyricsContent && track.type !== 'video'); + const canRenderLyrics = Boolean( + lyricsManager && activeElement && lyricsPane && lyricsContent && track.type !== 'video' + ); if (canRenderLyrics) { this.fullscreenLyricsVisible = true; if (lyricsToggleBtn) lyricsToggleBtn.style.removeProperty('display'); @@ -1349,7 +1351,8 @@ export class UIRenderer { overlay.classList.add('lyrics-unavailable'); if (lyricsContent) { clearFullscreenLyricsSync(lyricsContent); - lyricsContent.innerHTML = 'Lyrics are not available for this track.'; + lyricsContent.innerHTML = + 'Lyrics are not available for this track.'; } } this.updateFullscreenLyricsVisibility(overlay); @@ -1421,7 +1424,8 @@ export class UIRenderer { if (!title) return; const qualityBadge = this.getFullscreenQualityBadgeHTML(track); - const useMobileBadgeOnly = window.matchMedia('(max-width: 768px)').matches && overlay.classList.contains('lyrics-hidden'); + const useMobileBadgeOnly = + window.matchMedia('(max-width: 768px)').matches && overlay.classList.contains('lyrics-hidden'); title.innerHTML = useMobileBadgeOnly ? escapeHtml(track.title) : `${escapeHtml(track.title)} ${qualityBadge}`; if (mobileQuality) { @@ -1488,7 +1492,10 @@ export class UIRenderer { if (playerBar) playerBar.style.removeProperty('display'); const mainContent = document.querySelector('.main-content'); if (mainContent instanceof HTMLElement) { - if (typeof this.fullscreenMainContentOverflow === 'string' && this.fullscreenMainContentOverflow.length > 0) { + if ( + typeof this.fullscreenMainContentOverflow === 'string' && + this.fullscreenMainContentOverflow.length > 0 + ) { mainContent.style.overflowY = this.fullscreenMainContentOverflow; } else { mainContent.style.removeProperty('overflow-y'); diff --git a/styles.css b/styles.css index 04e9b75..5f78852 100644 --- a/styles.css +++ b/styles.css @@ -3924,6 +3924,7 @@ input:checked + .slider::before { /* Reserve space above taskbar / system UI so volume controls stay visible (fixes #322) */ padding-bottom: max(env(safe-area-inset-bottom), 1.5rem); + --fullscreen-drag-progress: 0; --fs-accent-rgb: var(--highlight-rgb); } @@ -3936,8 +3937,7 @@ input:checked + .slider::before { radial-gradient(circle at 50% 50%, rgb(255 255 255 / 0.035), transparent 58%), linear-gradient(180deg, rgb(6 8 12 / 0.12), rgb(6 8 12 / 0.34)); z-index: -1; - transition: - opacity 0.65s ease; + transition: opacity 0.65s ease; opacity: calc(1 - (var(--fullscreen-drag-progress, 0) * 0.32)); } @@ -3993,7 +3993,7 @@ input:checked + .slider::before { position: relative; padding: 1rem; overflow: hidden; - transform: translateY(var(--fullscreen-drag-offset, 0px)); + transform: translateY(var(--fullscreen-drag-offset, 0)); opacity: calc(1 - (var(--fullscreen-drag-progress, 0) * 0.16)); transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), @@ -4263,6 +4263,7 @@ input:checked + .slider::before { #fullscreen-cover-overlay.controls-idle { cursor: none; } + #fullscreen-cover-image { max-width: 55vw; max-height: 45vh; @@ -10125,6 +10126,7 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { #fullscreen-cover-overlay .fullscreen-main-view { --fs-media-column-size: minmax(340px, 430px); --fs-lyrics-column-size: minmax(520px, 760px); + width: min(1480px, 100%); height: 100%; flex: 1; @@ -10167,7 +10169,7 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; - box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26); + box-shadow: 0 28px 80px rgb(0, 0, 0, 0.26); } #fullscreen-cover-overlay #fullscreen-cover-image { @@ -10528,16 +10530,16 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { --lyrics-scroll-padding-top: 18%; --lyplus-blur-amount: 0.16em; --lyplus-blur-amount-near: 0.085em; + height: 100%; width: 100%; - font-family: - 'SF Pro Display', - Inter, - sans-serif; + font-family: 'SF Pro Display', Inter, sans-serif; + --lyplus-font-size-base: clamp(34px, 3vw, 52px); --lyplus-padding-line: 8px; - --lyplus-text-color: rgba(246, 244, 239, 0.08); + --lyplus-text-color: rgb(246, 244, 239, 0.08); --lyplus-active-color: #f6f4ef; + line-height: 1.32; letter-spacing: -0.04em; font-weight: 600; @@ -10563,6 +10565,7 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { #fullscreen-cover-overlay.lyrics-hidden .fullscreen-main-view { --fs-media-column-size: minmax(420px, 760px); --fs-lyrics-column-size: minmax(0, 0fr); + width: min(760px, 100%); gap: 0; } @@ -10609,11 +10612,8 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { width: min(760px, 100%); gap: 1.25rem; align-items: stretch; - padding: - calc(5rem + env(safe-area-inset-top)) - clamp(1rem, 4vw, 1.75rem) - calc(1.5rem + env(safe-area-inset-bottom)) - clamp(1rem, 4vw, 1.75rem); + padding: calc(5rem + env(safe-area-inset-top)) clamp(1rem, 4vw, 1.75rem) + calc(1.5rem + env(safe-area-inset-bottom)); } #fullscreen-cover-overlay .fullscreen-media-column { @@ -10682,11 +10682,7 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { 'lyrics lyrics' 'controls controls'; gap: 1rem 0.9rem; - padding: - calc(4.45rem + env(safe-area-inset-top)) - 0 - calc(0.8rem + env(safe-area-inset-bottom)) - 0; + padding: calc(4.45rem + env(safe-area-inset-top)) 0 calc(0.8rem + env(safe-area-inset-bottom)); } #fullscreen-cover-overlay .fullscreen-media-column { @@ -10775,9 +10771,10 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { --lyrics-scroll-padding-top: 18%; --lyplus-font-size-base: clamp(1.75rem, 7vw, 2.35rem); --lyplus-padding-line: 6px; - --lyplus-text-color: rgba(246, 244, 239, 0.16); + --lyplus-text-color: rgb(246, 244, 239, 0.16); --lyplus-blur-amount: 0.16em; --lyplus-blur-amount-near: 0.08em; + line-height: 1.2; } @@ -10834,11 +10831,8 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn { align-items: center; justify-items: center; gap: 0; - padding: - calc(4.45rem + env(safe-area-inset-top)) - clamp(1rem, 4vw, 1.4rem) - calc(0.8rem + env(safe-area-inset-bottom)) - clamp(1rem, 4vw, 1.4rem); + padding: calc(4.45rem + env(safe-area-inset-top)) clamp(1rem, 4vw, 1.4rem) + calc(0.8rem + env(safe-area-inset-bottom)); height: 100%; width: 100%; max-width: 100%;