diff --git a/plugins/radiant-lyrics-luna/src/Settings.tsx b/plugins/radiant-lyrics-luna/src/Settings.tsx index 2253459..ac33033 100644 --- a/plugins/radiant-lyrics-luna/src/Settings.tsx +++ b/plugins/radiant-lyrics-luna/src/Settings.tsx @@ -21,7 +21,6 @@ declare global { export const settings = await ReactiveStore.getPluginStorage("RadiantLyrics", { lyricsGlowEnabled: true, - trackTitleGlow: false, hideUIEnabled: true, playerBarVisible: false, qualityProgressColor: true, @@ -84,9 +83,6 @@ export const Settings = () => { const [spinSpeed, setSpinSpeed] = React.useState(settings.spinSpeed); const [settingsAffectNowPlaying, setSettingsAffectNowPlaying] = React.useState(settings.settingsAffectNowPlaying); - const [trackTitleGlow, setTrackTitleGlow] = React.useState( - settings.trackTitleGlow, - ); const [backgroundScale, setBackgroundScale] = React.useState( settings.backgroundScale, ); @@ -184,19 +180,7 @@ export const Settings = () => { } }} /> - { - settings.trackTitleGlow = checked; - setTrackTitleGlow(checked); - if (window.updateRadiantLyricsStyles) { - window.updateRadiantLyricsStyles(); - } - }} - /> - {(lyricsGlowEnabled || trackTitleGlow) && ( + {lyricsGlowEnabled && ( { /> { settings.floatingPlayerBar = checked; diff --git a/plugins/radiant-lyrics-luna/src/cover-everywhere.css b/plugins/radiant-lyrics-luna/src/cover-everywhere.css index 5dc1218..f2083c4 100644 --- a/plugins/radiant-lyrics-luna/src/cover-everywhere.css +++ b/plugins/radiant-lyrics-luna/src/cover-everywhere.css @@ -128,8 +128,7 @@ main, background: unset !important; } -/* Make sidebar and player bar semi-transparent with optimized backdrop-filter */ -[data-test="footer-player"], +/* Make sidebar semi-transparent with optimized backdrop-filter */ [data-test="main-layout-sidebar-wrapper"] { /* biome-ignore lint: Must beat app inline styles for translucency */ background-color: rgba(0, 0, 0, 0.3) !important; @@ -140,7 +139,6 @@ main, } /* Performance mode: reduce backdrop blur */ -.performance-mode [data-test="footer-player"], .performance-mode [data-test="main-layout-sidebar-wrapper"] { /* biome-ignore lint: Performance mode style requires priority */ backdrop-filter: blur(5px) !important; diff --git a/plugins/radiant-lyrics-luna/src/floating-player-bar.css b/plugins/radiant-lyrics-luna/src/floating-player-bar.css index 4c18a10..21d656c 100644 --- a/plugins/radiant-lyrics-luna/src/floating-player-bar.css +++ b/plugins/radiant-lyrics-luna/src/floating-player-bar.css @@ -1,9 +1,22 @@ -/* Floating Rounded Player Bar from Obsidian <3 */ +/* Square Player Bar override — injected when floating is disabled */ /* MARKER: Floating Player Bar CSS */ [data-test="footer-player"] { - position: absolute !important; - backdrop-filter: blur(10px); - border: 1px solid var(--wave-color-opacity-contrast-fill-ultra-thin, rgba(255, 255, 255, 0.1)) !important; + /* biome-ignore lint: Override native floating position */ + bottom: 0 !important; + /* biome-ignore lint: Override native floating position */ + left: 0 !important; + /* biome-ignore lint: Override native floating position */ + right: 0 !important; + /* biome-ignore lint: Override native floating position */ + width: 100% !important; + /* biome-ignore lint: Override native floating position */ + margin: 0 !important; + /* biome-ignore lint: Force square corners */ + border-radius: 0 !important; + /* biome-ignore lint: Remove floating border */ + border: none !important; + /* biome-ignore lint: Remove floating shadow */ + box-shadow: none !important; } diff --git a/plugins/radiant-lyrics-luna/src/index.ts b/plugins/radiant-lyrics-luna/src/index.ts index cb893ec..63b91b3 100644 --- a/plugins/radiant-lyrics-luna/src/index.ts +++ b/plugins/radiant-lyrics-luna/src/index.ts @@ -99,13 +99,12 @@ const hexToRgb = (hex: string): { r: number; g: number; b: number } => { }; }; -// Apply Settings to Floating Player Bar using inline styles because idk.. CSS is hard (Change my mind!) +// Apply inline styles to the player bar (tint + optional radius/spacing customisation) const applyPlayerBarTintToElement = (): void => { const footerPlayer = document.querySelector( '[data-test="footer-player"]', ) as HTMLElement; if (!footerPlayer) return; - // Always apply tint regardless of floating state const alpha = settings.playerBarTint / 10; const { r, g, b } = hexToRgb(settings.playerBarTintColor); footerPlayer.style.setProperty( @@ -135,12 +134,12 @@ const applyPlayerBarTintToElement = (): void => { } }; -// Apply/update the floating player bar stylesheet + tint +// When floating is disabled, inject square-bar CSS to override Tidal's native floating styles const applyFloatingPlayerBar = (): void => { if (settings.floatingPlayerBar) { - floatingPlayerBarStyleTag.css = floatingPlayerBarCss; - } else { floatingPlayerBarStyleTag.remove(); + } else { + floatingPlayerBarStyleTag.css = floatingPlayerBarCss; } applyPlayerBarTintToElement(); }; @@ -235,18 +234,6 @@ const updateRadiantLyricsStyles = function (): void { // Toggle glow via CSS vars + class on :root (always available, no timing issues) updateRadiantLyricsTextGlow(); - - // Track title glow toggle based on settings - const trackTitleEl = document.querySelector( - '[data-test="new-now-playing"] [class*="_titleContainer_"]', - ) as HTMLElement | null; - if (trackTitleEl) { - if (settings.trackTitleGlow && settings.lyricsGlowEnabled) { - trackTitleEl.classList.remove("rl-title-glow-disabled"); - } else { - trackTitleEl.classList.add("rl-title-glow-disabled"); - } - } }; // MARKER: UI Visibility Control @@ -4107,34 +4094,6 @@ function setupNowPlayingObserver(): void { }); } -function setupTrackTitleObserver(): void { - const trackTitleEl = document.querySelector( - '[data-test="new-now-playing"] [class*="_titleContainer_"]', - ) as HTMLElement | null; - if (trackTitleEl) { - if (settings.trackTitleGlow && settings.lyricsGlowEnabled) { - trackTitleEl.classList.remove("rl-title-glow-disabled"); - } else { - trackTitleEl.classList.add("rl-title-glow-disabled"); - } - } - observe( - unloads, - '[data-test="new-now-playing"]', - () => { - const el = document.querySelector( - '[data-test="new-now-playing"] [class*="_titleContainer_"]', - ) as HTMLElement | null; - if (!el) return; - if (settings.trackTitleGlow && settings.lyricsGlowEnabled) { - el.classList.remove("rl-title-glow-disabled"); - } else { - el.classList.add("rl-title-glow-disabled"); - } - }, - ); -} - // Apply seeker color on track change onGlobalTrackChange(() => { updateCoverArtBackground(); @@ -4144,6 +4103,5 @@ onGlobalTrackChange(() => { // Init observers setupHeaderObserver(); setupNowPlayingObserver(); -setupTrackTitleObserver(); setupStickyLyricsObserver(); setupTrackChangeListener(); diff --git a/plugins/radiant-lyrics-luna/src/lyrics-glow.css b/plugins/radiant-lyrics-luna/src/lyrics-glow.css index 37c9585..c39ea7b 100644 --- a/plugins/radiant-lyrics-luna/src/lyrics-glow.css +++ b/plugins/radiant-lyrics-luna/src/lyrics-glow.css @@ -68,29 +68,6 @@ transition-duration: 0.7s; } -/* Track title glow */ -[data-test="new-now-playing"] [class*="_titleContainer_"] { - /* Title text color/gradient is left to default app styling; only glow is customized. */ - text-shadow: - 0 0 var(--rl-glow-inner, 1px) var(--cl-glow1, #fff), - /* biome-ignore lint: Title glow needs priority */ - 0 0 var(--rl-glow-outer, 30px) #fff !important; - /* biome-ignore lint: Reset vendor background clip */ - -webkit-background-clip: initial !important; - /* biome-ignore lint: Reset background clip */ - background-clip: initial !important; - /* biome-ignore lint: Reset vendor text fill */ - -webkit-text-fill-color: initial !important; - /* biome-ignore lint: Ensure inherited color takes precedence */ - color: inherit !important; -} - -/* When track title glow setting is disabled, remove glow regardless of Colorama */ -[data-test="new-now-playing"] [class*="_titleContainer_"].rl-title-glow-disabled { - /* biome-ignore lint: Full reset required */ - text-shadow: none !important; -} - /* Current line transitions */ [data-test="now-playing-lyrics"] span[data-test="lyrics-line"] { transition: diff --git a/plugins/radiant-lyrics-luna/src/styles.css b/plugins/radiant-lyrics-luna/src/styles.css index 1c031f3..1b7a96b 100644 --- a/plugins/radiant-lyrics-luna/src/styles.css +++ b/plugins/radiant-lyrics-luna/src/styles.css @@ -277,4 +277,10 @@ body.rl-dropdown-open [data-test="toggle-lyrics"] { /* Remove max-width cap on now-playing content */ [class*="_contentInner"] { max-width: none !important; +} + +/* Round now-playing artwork corners */ +[data-test="now-playing-artwork"] { + /* biome-ignore lint: Override flat corners */ + border-radius: 10px !important; } \ No newline at end of file