Adjusted Default Settings

This commit is contained in:
2025-09-09 21:09:08 +10:00
parent fa0a7b7f56
commit b9a9588f9d
2 changed files with 28 additions and 28 deletions
+17 -17
View File
@@ -3,21 +3,21 @@ import { LunaSettings, LunaSwitchSetting, LunaNumberSetting } from "@luna/ui";
import React from "react";
export const settings = await ReactiveStore.getPluginStorage("RadiantLyrics", {
hideUIEnabled: true,
trackTitleGlow: false,
playerBarVisible: false,
lyricsGlowEnabled: true,
textGlow: 20,
spinningCoverEverywhere: true,
trackTitleGlow: false,
hideUIEnabled: true,
playerBarVisible: false,
CoverEverywhere: true,
performanceMode: false,
spinningArtEnabled: true,
spinningArt: true,
textGlow: 20,
backgroundScale: 15,
backgroundRadius: 25,
backgroundContrast: 120,
backgroundBlur: 80,
backgroundBrightness: 40,
spinSpeed: 45,
settingsAffectNowPlaying: true,
backgroundScale: 15,
backgroundRadius: 25,
});
export const Settings = () => {
@@ -31,14 +31,14 @@ export const Settings = () => {
settings.lyricsGlowEnabled,
);
const [textGlow, setTextGlow] = React.useState(settings.textGlow);
const [spinningCoverEverywhere, setSpinningCoverEverywhere] = React.useState(
settings.spinningCoverEverywhere,
const [CoverEverywhere, setCoverEverywhere] = React.useState(
settings.CoverEverywhere,
);
const [performanceMode, setPerformanceMode] = React.useState(
settings.performanceMode,
);
const [spinningArtEnabled, setSpinningArtEnabled] = React.useState(
settings.spinningArtEnabled,
const [spinningArt, setspinningArt] = React.useState(
settings.spinningArt,
);
const [backgroundContrast, setBackgroundContrast] = React.useState(
settings.backgroundContrast,
@@ -121,14 +121,14 @@ export const Settings = () => {
<AnySwitch
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"
checked={spinningCoverEverywhere}
checked={CoverEverywhere}
onChange={(_: unknown, checked: boolean) => {
console.log(
"Spinning Cover Everywhere:",
checked ? "enabled" : "disabled",
);
setSpinningCoverEverywhere(
(settings.spinningCoverEverywhere = checked),
setCoverEverywhere(
(settings.CoverEverywhere = checked),
);
// Update styles immediately when setting changes
if ((window as any).updateRadiantLyricsGlobalBackground) {
@@ -155,13 +155,13 @@ export const Settings = () => {
<AnySwitch
title="Background Cover Spin" // Cheers @Max/n0201 for the idea <3
desc="Enable the spinning cover art background animation"
checked={spinningArtEnabled}
checked={spinningArt}
onChange={(_: unknown, checked: boolean) => {
console.log(
"Background Cover Spin:",
checked ? "enabled" : "disabled",
);
setSpinningArtEnabled((settings.spinningArtEnabled = checked));
setspinningArt((settings.spinningArt = checked));
if ((window as any).updateRadiantLyricsGlobalBackground) {
(window as any).updateRadiantLyricsGlobalBackground();
}
+11 -11
View File
@@ -387,7 +387,7 @@ function updateCoverArtBackground(method: number = 0): void {
// Update backgrounds when we have a valid cover art source
if (coverArtImageSrc) {
// Apply global spinning background if enabled
if (settings.spinningCoverEverywhere) {
if (settings.CoverEverywhere) {
applyGlobalSpinningBackground(coverArtImageSrc);
}
@@ -495,10 +495,10 @@ function updateCoverArtBackground(method: number = 0): void {
const filt = `blur(${blur}px) brightness(${settings.backgroundBrightness / 100}) contrast(${contrast}%)`;
if (nowPlayingBackgroundImage.style.filter !== filt)
nowPlayingBackgroundImage.style.filter = filt;
const anim = settings.spinningArtEnabled
const anim = settings.spinningArt
? `spin ${settings.spinSpeed}s linear infinite`
: "none";
const wc = settings.spinningArtEnabled ? "transform" : "auto";
const wc = settings.spinningArt ? "transform" : "auto";
if (nowPlayingBackgroundImage.style.animation !== anim)
nowPlayingBackgroundImage.style.animation = anim;
if (nowPlayingBackgroundImage.style.willChange !== wc)
@@ -512,10 +512,10 @@ function updateCoverArtBackground(method: number = 0): void {
const filt = `blur(${settings.backgroundBlur}px) brightness(${settings.backgroundBrightness / 100}) contrast(${settings.backgroundContrast}%)`;
if (nowPlayingBackgroundImage.style.filter !== filt)
nowPlayingBackgroundImage.style.filter = filt;
const anim = settings.spinningArtEnabled
const anim = settings.spinningArt
? `spin ${settings.spinSpeed}s linear infinite`
: "none";
const wc = settings.spinningArtEnabled ? "transform" : "auto";
const wc = settings.spinningArt ? "transform" : "auto";
if (nowPlayingBackgroundImage.style.animation !== anim)
nowPlayingBackgroundImage.style.animation = anim;
if (nowPlayingBackgroundImage.style.willChange !== wc)
@@ -547,7 +547,7 @@ const applyGlobalSpinningBackground = (coverArtImageSrc: string): void => {
'[data-test="main"]',
) as HTMLElement;
if (!settings.spinningCoverEverywhere) {
if (!settings.CoverEverywhere) {
cleanUpGlobalSpinningBackground();
return;
}
@@ -663,7 +663,7 @@ const applyGlobalSpinningBackground = (coverArtImageSrc: string): void => {
if (globalBackgroundImage.style.borderRadius !== radius)
globalBackgroundImage.style.borderRadius = radius;
// Do not apply radius to vignette overlay; matches Now Playing behavior
if (settings.spinningArtEnabled) {
if (settings.spinningArt) {
globalBackgroundImage.style.animation = `spinGlobal ${settings.spinSpeed}s linear infinite`;
globalBackgroundImage.style.willChange = "transform";
} else {
@@ -677,7 +677,7 @@ const applyGlobalSpinningBackground = (coverArtImageSrc: string): void => {
if (globalBackgroundImage.style.borderRadius !== radius)
globalBackgroundImage.style.borderRadius = radius;
// Do not apply radius to vignette overlay; matches Now Playing behavior
if (settings.spinningArtEnabled) {
if (settings.spinningArt) {
globalBackgroundImage.style.animation = `spinGlobal ${settings.spinSpeed}s linear infinite`;
globalBackgroundImage.style.willChange = "transform";
} else {
@@ -715,7 +715,7 @@ const updateRadiantLyricsGlobalBackground = function (): void {
document.body.classList.remove("performance-mode");
}
if (settings.spinningCoverEverywhere) {
if (settings.CoverEverywhere) {
// Get current cover art and apply global background
updateCoverArtBackground();
} else {
@@ -761,7 +761,7 @@ const updateRadiantLyricsNowPlayingBackground = function (): void {
// Reduce blur and effects for better performance, but keep spinning
blur = Math.min(blur, 20);
contrast = Math.min(contrast, 150);
if (settings.spinningArtEnabled) {
if (settings.spinningArt) {
imgElement.style.animation = `spin ${spinSpeed}s linear infinite`;
imgElement.style.willChange = "transform";
} else {
@@ -770,7 +770,7 @@ const updateRadiantLyricsNowPlayingBackground = function (): void {
}
imgElement.classList.remove("performance-mode-static");
} else {
if (settings.spinningArtEnabled) {
if (settings.spinningArt) {
imgElement.style.animation = `spin ${spinSpeed}s linear infinite`;
imgElement.style.willChange = "transform";
} else {