From 422d03a54e771d197b5708de91644bad658d34fc Mon Sep 17 00:00:00 2001 From: meowarex Date: Wed, 11 Feb 2026 20:54:57 +1100 Subject: [PATCH] Biome <3 --- plugins/radiant-lyrics-luna/src/Settings.tsx | 163 +++++++++++-------- 1 file changed, 91 insertions(+), 72 deletions(-) diff --git a/plugins/radiant-lyrics-luna/src/Settings.tsx b/plugins/radiant-lyrics-luna/src/Settings.tsx index 736f508..d8547ad 100644 --- a/plugins/radiant-lyrics-luna/src/Settings.tsx +++ b/plugins/radiant-lyrics-luna/src/Settings.tsx @@ -2,6 +2,18 @@ import { ReactiveStore } from "@luna/core"; import { LunaSettings, LunaSwitchSetting, LunaNumberSetting } from "@luna/ui"; import React from "react"; +declare global { + interface Window { + updateRadiantLyricsStyles?: () => void; + updateRadiantLyricsTextGlow?: () => void; + updateStickyLyricsFeature?: () => void; + updateRadiantLyricsPlayerBarTint?: () => void; + updateRadiantLyricsGlobalBackground?: () => void; + updateRadiantLyricsNowPlayingBackground?: () => void; + updateStickyLyricsIcon?: () => void; + } +} + export const settings = await ReactiveStore.getPluginStorage("RadiantLyrics", { lyricsGlowEnabled: true, trackTitleGlow: false, @@ -115,8 +127,8 @@ export const Settings = () => { settings.lyricsGlowEnabled = checked; setLyricsGlowEnabled(checked); // Update styles immediately when setting changes - if ((window as any).updateRadiantLyricsStyles) { - (window as any).updateRadiantLyricsStyles(); + if (window.updateRadiantLyricsStyles) { + window.updateRadiantLyricsStyles(); } }} /> @@ -127,8 +139,8 @@ export const Settings = () => { onChange={(_: unknown, checked: boolean) => { settings.trackTitleGlow = checked; setTrackTitleGlow(checked); - if ((window as any).updateRadiantLyricsStyles) { - (window as any).updateRadiantLyricsStyles(); + if (window.updateRadiantLyricsStyles) { + window.updateRadiantLyricsStyles(); } }} /> @@ -144,8 +156,8 @@ export const Settings = () => { settings.textGlow = value; setTextGlow(value); // Update variables immediately when setting changes - if ((window as any).updateRadiantLyricsTextGlow) { - (window as any).updateRadiantLyricsTextGlow(); + if (window.updateRadiantLyricsTextGlow) { + window.updateRadiantLyricsTextGlow(); } }} /> @@ -157,8 +169,8 @@ export const Settings = () => { onChange={(_: unknown, checked: boolean) => { settings.stickyLyricsFeature = checked; setStickyLyricsFeature(checked); - if ((window as any).updateStickyLyricsFeature) { - (window as any).updateStickyLyricsFeature(); + if (window.updateStickyLyricsFeature) { + window.updateStickyLyricsFeature(); } }} /> @@ -181,8 +193,8 @@ export const Settings = () => { settings.playerBarVisible = checked; setPlayerBarVisible(checked); // Update styles immediately when setting changes - if ((window as any).updateRadiantLyricsStyles) { - (window as any).updateRadiantLyricsStyles(); + if (window.updateRadiantLyricsStyles) { + window.updateRadiantLyricsStyles(); } }} /> @@ -194,8 +206,8 @@ export const Settings = () => { onChange={(_: unknown, checked: boolean) => { settings.floatingPlayerBar = checked; setFloatingPlayerBar(checked); - if ((window as any).updateRadiantLyricsStyles) { - (window as any).updateRadiantLyricsStyles(); + if (window.updateRadiantLyricsStyles) { + window.updateRadiantLyricsStyles(); } }} /> @@ -211,7 +223,7 @@ export const Settings = () => { onNumber={(value: number) => { settings.playerBarRadius = value; setPlayerBarRadius(value); - (window as any).updateRadiantLyricsPlayerBarTint?.(); + window.updateRadiantLyricsPlayerBarTint?.(); }} /> { onNumber={(value: number) => { settings.playerBarSpacing = value; setPlayerBarSpacing(value); - (window as any).updateRadiantLyricsPlayerBarTint?.(); + window.updateRadiantLyricsPlayerBarTint?.(); }} /> @@ -248,7 +260,7 @@ export const Settings = () => { setPlayerBarTintColor(color); setTintCustomInput(color); settings.playerBarTintColor = color; - (window as any).updateRadiantLyricsPlayerBarTint?.(); + window.updateRadiantLyricsPlayerBarTint?.(); }; const addTintCustomColor = () => { @@ -299,7 +311,7 @@ export const Settings = () => { onNumber={(value: number) => { settings.playerBarTint = value; setPlayerBarTint(value); - (window as any).updateRadiantLyricsPlayerBarTint?.(); + window.updateRadiantLyricsPlayerBarTint?.(); }} /> {/* Color swatch — positioned just left of the value box */} @@ -327,17 +339,23 @@ export const Settings = () => { {/* Color Picker Modal */} {shouldRenderTintPicker && ( <> -
+