mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
fix bg color / padding of sidebar panel
This commit is contained in:
@@ -32,7 +32,11 @@ import {
|
|||||||
StructuredLyric,
|
StructuredLyric,
|
||||||
} from '/@/shared/types/domain-types';
|
} from '/@/shared/types/domain-types';
|
||||||
|
|
||||||
export const Lyrics = () => {
|
type LyricsProps = {
|
||||||
|
fadeOutNoLyricsMessage?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Lyrics = ({ fadeOutNoLyricsMessage = true }: LyricsProps) => {
|
||||||
const currentSong = usePlayerSong();
|
const currentSong = usePlayerSong();
|
||||||
const {
|
const {
|
||||||
enableAutoTranslation,
|
enableAutoTranslation,
|
||||||
@@ -265,6 +269,11 @@ export const Lyrics = () => {
|
|||||||
|
|
||||||
// Trigger fade out after a few seconds when no lyrics are found
|
// Trigger fade out after a few seconds when no lyrics are found
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!fadeOutNoLyricsMessage) {
|
||||||
|
setShouldFadeOut(false);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isLoadingLyrics && hasNoLyrics) {
|
if (!isLoadingLyrics && hasNoLyrics) {
|
||||||
// Start fade out after 3 seconds (message visible for 3s, then 0.5s fade)
|
// Start fade out after 3 seconds (message visible for 3s, then 0.5s fade)
|
||||||
const timer = setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
@@ -279,7 +288,7 @@ export const Lyrics = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}, [isLoadingLyrics, hasNoLyrics]);
|
}, [isLoadingLyrics, hasNoLyrics, fadeOutNoLyricsMessage]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ComponentErrorBoundary>
|
<ComponentErrorBoundary>
|
||||||
@@ -296,7 +305,7 @@ export const Lyrics = () => {
|
|||||||
transition={{ duration: 0.5 }}
|
transition={{ duration: 0.5 }}
|
||||||
>
|
>
|
||||||
<Group>
|
<Group>
|
||||||
<Text fw={500}>
|
<Text fw={500} isMuted isNoSelect>
|
||||||
{t('page.fullscreenPlayer.noLyrics', {
|
{t('page.fullscreenPlayer.noLyrics', {
|
||||||
postProcess: 'sentenceCase',
|
postProcess: 'sentenceCase',
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -13,8 +13,10 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
|
padding: var(--theme-spacing-md);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--theme-colors-background);
|
background: var(--theme-colors-background);
|
||||||
|
background-color: var(--theme-colors-background-alternate);
|
||||||
}
|
}
|
||||||
|
|
||||||
.lyrics-section :global(.synchronized-lyrics) {
|
.lyrics-section :global(.synchronized-lyrics) {
|
||||||
@@ -43,6 +45,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
|
padding: var(--theme-spacing-md);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--theme-colors-background);
|
background: var(--theme-colors-background);
|
||||||
|
background-color: var(--theme-colors-background-alternate);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ const BottomPanel = () => {
|
|||||||
<Divider />
|
<Divider />
|
||||||
{showLyricsInSidebar ? (
|
{showLyricsInSidebar ? (
|
||||||
<div className={styles.lyricsSection}>
|
<div className={styles.lyricsSection}>
|
||||||
<Lyrics />
|
<Lyrics fadeOutNoLyricsMessage={showVisualizer} />
|
||||||
{showVisualizer && (
|
{showVisualizer && (
|
||||||
<div
|
<div
|
||||||
className={styles.visualizerOverlay}
|
className={styles.visualizerOverlay}
|
||||||
|
|||||||
Reference in New Issue
Block a user