feat(queue): split tech bar into two lines when ReplayGain is present

The tech info strip in the queue header was a single ellipsised line, so
ReplayGain values (Track / Album / Peak) got cut off on tracks with a
full codec + bitrate + samplerate prefix. Now the strip wraps into two
lines whenever RG values exist:

- Line 1: codec · bitrate · bit depth/sample rate (unchanged)
- Line 2: 'ReplayGain · T … dB · A … dB · Peak …' — slightly smaller
  and dimmed for hierarchy, ellipsises independently if it still
  overflows.

Tracks without RG metadata stay one line as before. New i18n key
`queue.replayGain` ('ReplayGain') added to all 8 locales.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-19 12:24:46 +02:00
parent 2871db9a96
commit a48159d302
10 changed files with 42 additions and 4 deletions
+13 -4
View File
@@ -451,10 +451,11 @@ export default function QueuePanel() {
})(),
].filter(Boolean) as string[];
const rgParts = formatQueueReplayGainParts(currentTrack, t);
const techLine = [...baseParts, ...rgParts].join(' · ');
if (!techLine && !playbackSource) return null;
const baseLine = baseParts.join(' · ');
const rgLine = rgParts.join(' · ');
if (!baseLine && !rgLine && !playbackSource) return null;
return (
<div className="queue-current-tech">
<div className={`queue-current-tech${rgLine ? ' queue-current-tech--two-line' : ''}`}>
{playbackSource && (
<span
className="queue-current-tech-source"
@@ -472,7 +473,15 @@ export default function QueuePanel() {
{playbackSource === 'stream' && <Waves size={11} strokeWidth={2.25} />}
</span>
)}
<span className="queue-current-tech-main">{techLine}</span>
<div className="queue-current-tech-stack">
{baseLine && <span className="queue-current-tech-main">{baseLine}</span>}
{rgLine && (
<span className="queue-current-tech-rg">
<span className="queue-current-tech-rg-label">{t('queue.replayGain')}</span>
{' · '}{rgLine}
</span>
)}
</div>
</div>
);
})()}