mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-06-18 03:43:10 +10:00
@@ -4,13 +4,14 @@ import React from "react";
|
|||||||
|
|
||||||
export const settings = await ReactiveStore.getPluginStorage("RadiantLyrics", {
|
export const settings = await ReactiveStore.getPluginStorage("RadiantLyrics", {
|
||||||
hideUIEnabled: true,
|
hideUIEnabled: true,
|
||||||
playerBarVisible: true,
|
playerBarVisible: false,
|
||||||
lyricsGlowEnabled: true,
|
lyricsGlowEnabled: true,
|
||||||
spinningCoverEverywhere: false,
|
textGlow: 20,
|
||||||
|
spinningCoverEverywhere: true,
|
||||||
performanceMode: false,
|
performanceMode: false,
|
||||||
spinningArtEnabled: true,
|
spinningArtEnabled: true,
|
||||||
backgroundContrast: 120,
|
backgroundContrast: 120,
|
||||||
backgroundBlur: 80,
|
backgroundBlur: 80,
|
||||||
backgroundBrightness: 40,
|
backgroundBrightness: 40,
|
||||||
spinSpeed: 45,
|
spinSpeed: 45,
|
||||||
settingsAffectNowPlaying: true,
|
settingsAffectNowPlaying: true,
|
||||||
@@ -20,6 +21,7 @@ export const Settings = () => {
|
|||||||
const [hideUIEnabled, setHideUIEnabled] = React.useState(settings.hideUIEnabled);
|
const [hideUIEnabled, setHideUIEnabled] = React.useState(settings.hideUIEnabled);
|
||||||
const [playerBarVisible, setPlayerBarVisible] = React.useState(settings.playerBarVisible);
|
const [playerBarVisible, setPlayerBarVisible] = React.useState(settings.playerBarVisible);
|
||||||
const [lyricsGlowEnabled, setLyricsGlowEnabled] = React.useState(settings.lyricsGlowEnabled);
|
const [lyricsGlowEnabled, setLyricsGlowEnabled] = React.useState(settings.lyricsGlowEnabled);
|
||||||
|
const [textGlow, setTextGlow] = React.useState(settings.textGlow);
|
||||||
const [spinningCoverEverywhere, setSpinningCoverEverywhere] = React.useState(settings.spinningCoverEverywhere);
|
const [spinningCoverEverywhere, setSpinningCoverEverywhere] = React.useState(settings.spinningCoverEverywhere);
|
||||||
const [performanceMode, setPerformanceMode] = React.useState(settings.performanceMode);
|
const [performanceMode, setPerformanceMode] = React.useState(settings.performanceMode);
|
||||||
const [spinningArtEnabled, setSpinningArtEnabled] = React.useState(settings.spinningArtEnabled);
|
const [spinningArtEnabled, setSpinningArtEnabled] = React.useState(settings.spinningArtEnabled);
|
||||||
@@ -65,7 +67,7 @@ export const Settings = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<LunaSwitchSetting
|
<LunaSwitchSetting
|
||||||
title="Cover Everywhere | Experimental"
|
title="Cover Everywhere"
|
||||||
desc="Apply the spinning Cover Art background to the entire app, not just the Now Playing view, Heavily Inspired by Cover-Theme by @Inrixia"
|
desc="Apply the spinning Cover Art background to the entire app, not just the Now Playing view, Heavily Inspired by Cover-Theme by @Inrixia"
|
||||||
checked={spinningCoverEverywhere}
|
checked={spinningCoverEverywhere}
|
||||||
onChange={(_, checked: boolean) => {
|
onChange={(_, checked: boolean) => {
|
||||||
@@ -78,8 +80,8 @@ export const Settings = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<LunaSwitchSetting
|
<LunaSwitchSetting
|
||||||
title="Performance Mode"
|
title="Performance Mode | Experimental"
|
||||||
desc="Performance mode: Reduces blur effects (20px), uses smaller image sizes, to optimize GPU usage"
|
desc="Performance mode: Reduces blur effects & uses smaller image sizes, to optimize GPU usage"
|
||||||
checked={performanceMode}
|
checked={performanceMode}
|
||||||
onChange={(_, checked: boolean) => {
|
onChange={(_, checked: boolean) => {
|
||||||
console.log("Performance Mode:", checked ? "enabled" : "disabled");
|
console.log("Performance Mode:", checked ? "enabled" : "disabled");
|
||||||
@@ -108,6 +110,21 @@ export const Settings = () => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<LunaNumberSetting
|
||||||
|
title="Text Glow"
|
||||||
|
desc="Adjust the glow size of lyrics (0-100, default: 20)"
|
||||||
|
min={0}
|
||||||
|
max={100}
|
||||||
|
step={1}
|
||||||
|
value={textGlow}
|
||||||
|
onNumber={(value: number) => {
|
||||||
|
setTextGlow((settings.textGlow = value));
|
||||||
|
// Update variables immediately when setting changes
|
||||||
|
if ((window as any).updateRadiantLyricsTextGlow) {
|
||||||
|
(window as any).updateRadiantLyricsTextGlow();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<LunaNumberSetting
|
<LunaNumberSetting
|
||||||
title="Background Contrast"
|
title="Background Contrast"
|
||||||
desc="Adjust the contrast of the spinning background (0-200, default: 120)"
|
desc="Adjust the contrast of the spinning background (0-200, default: 120)"
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ if (settings.lyricsGlowEnabled) {
|
|||||||
lyricsGlowStyleTag.css = lyricsGlow;
|
lyricsGlowStyleTag.css = lyricsGlow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update CSS variables for lyrics text glow based on settings
|
||||||
|
const updateRadiantLyricsTextGlow = function(): void {
|
||||||
|
const root = document.documentElement;
|
||||||
|
root.style.setProperty('--rl-glow-outer', `${settings.textGlow}px`);
|
||||||
|
root.style.setProperty('--rl-glow-inner', '2px');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Function to update styles when settings change
|
// Function to update styles when settings change
|
||||||
const updateRadiantLyricsStyles = function(): void {
|
const updateRadiantLyricsStyles = function(): void {
|
||||||
@@ -53,6 +60,7 @@ const updateRadiantLyricsStyles = function(): void {
|
|||||||
if (settings.lyricsGlowEnabled) {
|
if (settings.lyricsGlowEnabled) {
|
||||||
lyricsContainer.classList.remove('lyrics-glow-disabled');
|
lyricsContainer.classList.remove('lyrics-glow-disabled');
|
||||||
lyricsGlowStyleTag.css = lyricsGlow;
|
lyricsGlowStyleTag.css = lyricsGlow;
|
||||||
|
updateRadiantLyricsTextGlow();
|
||||||
} else {
|
} else {
|
||||||
lyricsContainer.classList.add('lyrics-glow-disabled');
|
lyricsContainer.classList.add('lyrics-glow-disabled');
|
||||||
lyricsGlowStyleTag.remove();
|
lyricsGlowStyleTag.remove();
|
||||||
@@ -63,6 +71,7 @@ const updateRadiantLyricsStyles = function(): void {
|
|||||||
if (settings.lyricsGlowEnabled) {
|
if (settings.lyricsGlowEnabled) {
|
||||||
el.classList.remove('lyrics-glow-disabled');
|
el.classList.remove('lyrics-glow-disabled');
|
||||||
lyricsGlowStyleTag.css = lyricsGlow;
|
lyricsGlowStyleTag.css = lyricsGlow;
|
||||||
|
updateRadiantLyricsTextGlow();
|
||||||
} else {
|
} else {
|
||||||
el.classList.add('lyrics-glow-disabled');
|
el.classList.add('lyrics-glow-disabled');
|
||||||
lyricsGlowStyleTag.remove();
|
lyricsGlowStyleTag.remove();
|
||||||
@@ -624,6 +633,7 @@ const updateRadiantLyricsNowPlayingBackground = function(): void {
|
|||||||
(window as any).updateRadiantLyricsStyles = updateRadiantLyricsStyles;
|
(window as any).updateRadiantLyricsStyles = updateRadiantLyricsStyles;
|
||||||
(window as any).updateRadiantLyricsGlobalBackground = updateRadiantLyricsGlobalBackground;
|
(window as any).updateRadiantLyricsGlobalBackground = updateRadiantLyricsGlobalBackground;
|
||||||
(window as any).updateRadiantLyricsNowPlayingBackground = updateRadiantLyricsNowPlayingBackground;
|
(window as any).updateRadiantLyricsNowPlayingBackground = updateRadiantLyricsNowPlayingBackground;
|
||||||
|
(window as any).updateRadiantLyricsTextGlow = updateRadiantLyricsTextGlow;
|
||||||
|
|
||||||
|
|
||||||
const cleanUpDynamicArt = function (): void {
|
const cleanUpDynamicArt = function (): void {
|
||||||
@@ -672,6 +682,9 @@ if (settings.performanceMode) {
|
|||||||
document.body.classList.add('performance-mode');
|
document.body.classList.add('performance-mode');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize text glow CSS variables on load
|
||||||
|
updateRadiantLyricsTextGlow();
|
||||||
|
|
||||||
updateCoverArtBackground(1);
|
updateCoverArtBackground(1);
|
||||||
|
|
||||||
// Add cleanup to unloads
|
// Add cleanup to unloads
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
/* Enhanced lyrics styling with glow effects */
|
/* Enhanced lyrics styling with glow effects */
|
||||||
[class*="_lyricsText"] > div > span[data-current="true"] {
|
[class*="_lyricsText"] > div > span[data-current="true"] {
|
||||||
text-shadow: 0 0 2px #fff, 0 0 20px #fff !important;
|
text-shadow: 0 0 var(--rl-glow-inner, 2px) #fff, 0 0 var(--rl-glow-outer, 20px) #fff !important;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
transition-duration: 0.7s;
|
transition-duration: 0.7s;
|
||||||
font-size: 55px;
|
font-size: 55px;
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
[class*="_lyricsText"] > div > span:hover {
|
[class*="_lyricsText"] > div > span:hover {
|
||||||
text-shadow: 0 0 2px lightgray, 0 0 20px lightgray !important;
|
text-shadow: 0 0 var(--rl-glow-inner, 2px) lightgray, 0 0 var(--rl-glow-outer, 20px) lightgray !important;
|
||||||
color: lightgray !important;
|
color: lightgray !important;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
transition-duration: 0.7s;
|
transition-duration: 0.7s;
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
/* Track title glow */
|
/* Track title glow */
|
||||||
[data-test="now-playing-track-title"] {
|
[data-test="now-playing-track-title"] {
|
||||||
text-shadow: 0 0 1px #fff, 0 0 30px #fff !important;
|
text-shadow: 0 0 1px #fff, 0 0 var(--rl-glow-outer, 30px) #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Current line transitions */
|
/* Current line transitions */
|
||||||
|
|||||||
Reference in New Issue
Block a user