mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
fix(favorites): correct post-merge issues from PR #184
- btn-sm: add global .btn-sm modifier to theme.css (was only scoped inside device-sync) - year filter: exclude songs without year metadata when filter is active - showing count: only render "X of Y" label when a filter is actually active Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+10
-8
@@ -228,9 +228,9 @@ export default function Favorites() {
|
|||||||
if (!hasMatchingGenre) return false;
|
if (!hasMatchingGenre) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Year range filter
|
// Year range filter — only applied when range is non-default; songs without year are excluded
|
||||||
if (s.year !== undefined) {
|
if (yearRange[0] !== MIN_YEAR || yearRange[1] !== CURRENT_YEAR) {
|
||||||
if (s.year < yearRange[0] || s.year > yearRange[1]) return false;
|
if (s.year === undefined || s.year < yearRange[0] || s.year > yearRange[1]) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -316,11 +316,13 @@ export default function Favorites() {
|
|||||||
{/* Title Row with showing X of Y indicator */}
|
{/* Title Row with showing X of Y indicator */}
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', flexWrap: 'wrap' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '1rem', flexWrap: 'wrap' }}>
|
||||||
<h2 className="section-title" style={{ margin: 0 }}>{t('favorites.songs')}</h2>
|
<h2 className="section-title" style={{ margin: 0 }}>{t('favorites.songs')}</h2>
|
||||||
<span style={{ fontSize: '0.8rem', color: 'var(--muted)', fontStyle: 'italic' }}>
|
{(selectedArtist || selectedGenres.length > 0 || yearRange[0] !== MIN_YEAR || yearRange[1] !== CURRENT_YEAR) && (
|
||||||
{selectedArtist
|
<span style={{ fontSize: '0.8rem', color: 'var(--text-muted)', fontStyle: 'italic' }}>
|
||||||
? t('favorites.showingFiltered', { filtered: visibleSongs.length, total: songs.filter(s => starredOverrides[s.id] !== false).length, artist: selectedArtist })
|
{selectedArtist
|
||||||
: t('favorites.showingCount', { filtered: visibleSongs.length, total: songs.filter(s => starredOverrides[s.id] !== false).length })}
|
? t('favorites.showingFiltered', { filtered: visibleSongs.length, total: songs.filter(s => starredOverrides[s.id] !== false).length, artist: selectedArtist })
|
||||||
</span>
|
: t('favorites.showingCount', { filtered: visibleSongs.length, total: songs.filter(s => starredOverrides[s.id] !== false).length })}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Action Buttons */}
|
{/* Action Buttons */}
|
||||||
|
|||||||
@@ -3711,6 +3711,12 @@ body.psy-dragging * {
|
|||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-sm {
|
||||||
|
padding: 3px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
gap: var(--space-1);
|
||||||
|
}
|
||||||
|
|
||||||
/* ─── Input ─── */
|
/* ─── Input ─── */
|
||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user