mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-08 05:12:57 +02:00
hide lyric translation line if same as parent (#2311)
This commit is contained in:
@@ -181,6 +181,7 @@ export const KaraokeLyricLine = memo(
|
|||||||
pronunciationText,
|
pronunciationText,
|
||||||
romajiCueLines,
|
romajiCueLines,
|
||||||
romajiText,
|
romajiText,
|
||||||
|
text,
|
||||||
translatedText,
|
translatedText,
|
||||||
translationCueLines,
|
translationCueLines,
|
||||||
...props
|
...props
|
||||||
@@ -258,6 +259,7 @@ export const KaraokeLyricLine = memo(
|
|||||||
styles.overlayLine,
|
styles.overlayLine,
|
||||||
)}
|
)}
|
||||||
{translationCueLine &&
|
{translationCueLine &&
|
||||||
|
translationCueLine.value !== cueLine.value &&
|
||||||
renderOverlayCueLineRow(
|
renderOverlayCueLineRow(
|
||||||
translationCueLine,
|
translationCueLine,
|
||||||
lineIndex,
|
lineIndex,
|
||||||
@@ -276,7 +278,7 @@ export const KaraokeLyricLine = memo(
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{!hasSyncedTranslation && translatedText && (
|
{!hasSyncedTranslation && translatedText && translatedText !== text && (
|
||||||
<span
|
<span
|
||||||
className={styles.translationLine}
|
className={styles.translationLine}
|
||||||
dangerouslySetInnerHTML={{ __html: sanitize(translatedText) }}
|
dangerouslySetInnerHTML={{ __html: sanitize(translatedText) }}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const LyricLine = memo(
|
|||||||
dangerouslySetInnerHTML={{ __html: sanitize(romajiText) }}
|
dangerouslySetInnerHTML={{ __html: sanitize(romajiText) }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{translatedText && (
|
{translatedText && translatedText !== text && (
|
||||||
<span dangerouslySetInnerHTML={{ __html: sanitize(translatedText) }} />
|
<span dangerouslySetInnerHTML={{ __html: sanitize(translatedText) }} />
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -439,6 +439,7 @@ export const SynchronizedKaraokeLyrics = ({
|
|||||||
? (syncedRomajiLyrics[idx] ?? null)
|
? (syncedRomajiLyrics[idx] ?? null)
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
text={getLyricLineText(rawLine)}
|
||||||
translatedText={translationText}
|
translatedText={translationText}
|
||||||
translationCueLines={translationCueLines}
|
translationCueLines={translationCueLines}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user