Add LrcLib Fetcher (#136)

* lrclib, do not show search/clear buttons if no fetchers configured
This commit is contained in:
Kendall Garner 2023-06-11 19:45:50 +00:00 committed by GitHub
parent d7ca25525c
commit d6e628099c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 141 additions and 5 deletions

View file

@ -18,7 +18,7 @@ interface LyricsActionsProps {
export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActionsProps) => {
const currentSong = useCurrentSong();
const { setSettings } = useSettingsStoreActions();
const { delayMs } = useLyricsSettings();
const { delayMs, sources } = useLyricsSettings();
const handleLyricOffset = (e: number) => {
setSettings({
@ -34,7 +34,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
return (
<>
{isDesktop ? (
{isDesktop && sources.length ? (
<Button
uppercase
disabled={isActionsDisabled}
@ -76,7 +76,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
>
<RiAddFill />
</Button>
{isDesktop ? (
{isDesktop && sources.length ? (
<Button
uppercase
disabled={isActionsDisabled}