mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 02:43:33 +00:00
Adjust lyrics styling / animations
This commit is contained in:
parent
7cd2077dcd
commit
5dd860735d
5 changed files with 47 additions and 28 deletions
|
|
@ -1,16 +1,15 @@
|
|||
import { useEffect, useRef, useState } from 'react';
|
||||
import { Center, Group } from '@mantine/core';
|
||||
import isElectron from 'is-electron';
|
||||
import { ErrorBoundary } from 'react-error-boundary';
|
||||
import { ErrorFallback } from '/@/renderer/features/action-required';
|
||||
import { getServerById, useCurrentSong } from '/@/renderer/store';
|
||||
import { SynchronizedLyrics } from './synchronized-lyrics';
|
||||
import { UnsynchronizedLyrics } from '/@/renderer/features/lyrics/unsynchronized-lyrics';
|
||||
import { LyricLine } from '/@/renderer/features/lyrics/lyric-line';
|
||||
import { Center, Group } from '@mantine/core';
|
||||
import { RiInformationFill } from 'react-icons/ri';
|
||||
import { TextTitle } from '/@/renderer/components';
|
||||
import { LyricsResponse, SynchronizedLyricsArray } from '/@/renderer/api/types';
|
||||
import { useSongLyrics } from '/@/renderer/features/lyrics/queries/lyric-query';
|
||||
import { SynchronizedLyrics } from './synchronized-lyrics';
|
||||
|
||||
const lyrics = isElectron() ? window.electron.lyrics : null;
|
||||
|
||||
|
|
@ -120,18 +119,17 @@ export const Lyrics = () => {
|
|||
</Group>
|
||||
</Center>
|
||||
)}
|
||||
{source && (
|
||||
<LyricLine
|
||||
key="provided-by"
|
||||
className="credit"
|
||||
text={`Provided by: ${source}`}
|
||||
/>
|
||||
)}
|
||||
{songLyrics &&
|
||||
(Array.isArray(songLyrics) ? (
|
||||
<SynchronizedLyrics lyrics={songLyrics} />
|
||||
<SynchronizedLyrics
|
||||
lyrics={songLyrics}
|
||||
source={source}
|
||||
/>
|
||||
) : (
|
||||
<UnsynchronizedLyrics lyrics={songLyrics} />
|
||||
<UnsynchronizedLyrics
|
||||
lyrics={songLyrics}
|
||||
source={source}
|
||||
/>
|
||||
))}
|
||||
</ErrorBoundary>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue