mirror of
https://github.com/meowarex/TidaLuna-Plugins.git
synced 2026-06-18 03:43:10 +10:00
Added Sticky Lyrics
This commit is contained in:
@@ -18,6 +18,9 @@ export const settings = await ReactiveStore.getPluginStorage("RadiantLyrics", {
|
||||
backgroundBrightness: 40,
|
||||
spinSpeed: 45,
|
||||
settingsAffectNowPlaying: true,
|
||||
stickyLyricsFeature: true,
|
||||
stickyLyrics: false,
|
||||
stickyLyricsIcon: "chevron" as string,
|
||||
});
|
||||
|
||||
export const Settings = () => {
|
||||
@@ -61,6 +64,9 @@ export const Settings = () => {
|
||||
const [backgroundRadius, setBackgroundRadius] = React.useState(
|
||||
settings.backgroundRadius,
|
||||
);
|
||||
const [stickyLyricsFeature, setStickyLyricsFeature] = React.useState(
|
||||
settings.stickyLyricsFeature,
|
||||
);
|
||||
|
||||
// Derive props and override onChange to accept a broader first param type
|
||||
type BaseSwitchProps = React.ComponentProps<typeof LunaSwitchSetting>;
|
||||
@@ -97,6 +103,17 @@ export const Settings = () => {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<AnySwitch
|
||||
title="Sticky Lyrics"
|
||||
desc="Adds a dropdown to the Lyrics tab that auto-switches to Play Queue when lyrics aren't available"
|
||||
checked={stickyLyricsFeature}
|
||||
onChange={(_: unknown, checked: boolean) => {
|
||||
setStickyLyricsFeature((settings.stickyLyricsFeature = checked));
|
||||
if ((window as any).updateStickyLyricsFeature) {
|
||||
(window as any).updateStickyLyricsFeature();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<AnySwitch
|
||||
title="Hide UI Feature"
|
||||
desc="Enable hide/unhide UI functionality with toggle buttons"
|
||||
|
||||
Reference in New Issue
Block a user