Restore legacy issue icons
- bring back the old symbol-based issue category icons in the React issues UI - keep the issue detail modal fallback aligned with the shared metadata - add a small regression check for the restored icon set
This commit is contained in:
parent
3470654fc5
commit
497a6f41ed
4 changed files with 21 additions and 13 deletions
|
|
@ -26,8 +26,10 @@ dist/
|
||||||
build/
|
build/
|
||||||
|
|
||||||
# Frontend build artifacts and local dependency caches
|
# Frontend build artifacts and local dependency caches
|
||||||
webui/node_modules/
|
webui/.tanstack/
|
||||||
webui/.vite/
|
webui/.vite/
|
||||||
|
webui/node_modules/
|
||||||
|
webui/test-results/
|
||||||
webui/static/dist/
|
webui/static/dist/
|
||||||
|
|
||||||
# Virtual environments
|
# Virtual environments
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { describe, expect, it } from 'vite-plus/test';
|
import { describe, expect, it } from 'vite-plus/test';
|
||||||
|
|
||||||
import { normalizeIssuesSearch } from './-issues.helpers';
|
import { ISSUE_CATEGORY_META, normalizeIssuesSearch } from './-issues.helpers';
|
||||||
|
|
||||||
describe('normalizeIssuesSearch', () => {
|
describe('normalizeIssuesSearch', () => {
|
||||||
it('falls back to all for unknown categories', () => {
|
it('falls back to all for unknown categories', () => {
|
||||||
|
|
@ -32,4 +32,10 @@ describe('normalizeIssuesSearch', () => {
|
||||||
issueId: 7,
|
issueId: 7,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('keeps the legacy category icons', () => {
|
||||||
|
expect(ISSUE_CATEGORY_META.wrong_metadata.icon).toBe('✎');
|
||||||
|
expect(ISSUE_CATEGORY_META.wrong_cover.icon).toBe('📷');
|
||||||
|
expect(ISSUE_CATEGORY_META.audio_quality.icon).toBe('🎵');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -14,61 +14,61 @@ export const ISSUE_CATEGORY_META: Record<
|
||||||
> = {
|
> = {
|
||||||
wrong_track: {
|
wrong_track: {
|
||||||
label: 'Wrong Track',
|
label: 'Wrong Track',
|
||||||
icon: 'XT',
|
icon: '❌',
|
||||||
description: 'This file plays a different song than expected',
|
description: 'This file plays a different song than expected',
|
||||||
applies: ['track'],
|
applies: ['track'],
|
||||||
},
|
},
|
||||||
wrong_metadata: {
|
wrong_metadata: {
|
||||||
label: 'Wrong Metadata',
|
label: 'Wrong Metadata',
|
||||||
icon: 'MD',
|
icon: '✎',
|
||||||
description: 'Title, artist, year, or other tags are incorrect',
|
description: 'Title, artist, year, or other tags are incorrect',
|
||||||
applies: ['track', 'album'],
|
applies: ['track', 'album'],
|
||||||
},
|
},
|
||||||
wrong_cover: {
|
wrong_cover: {
|
||||||
label: 'Wrong Cover Art',
|
label: 'Wrong Cover Art',
|
||||||
icon: 'CA',
|
icon: '📷',
|
||||||
description: 'The artwork is wrong or missing',
|
description: 'The artwork is wrong or missing',
|
||||||
applies: ['album'],
|
applies: ['album'],
|
||||||
},
|
},
|
||||||
wrong_artist: {
|
wrong_artist: {
|
||||||
label: 'Wrong Artist',
|
label: 'Wrong Artist',
|
||||||
icon: 'AR',
|
icon: '👤',
|
||||||
description: 'This track is filed under the wrong artist',
|
description: 'This track is filed under the wrong artist',
|
||||||
applies: ['track'],
|
applies: ['track'],
|
||||||
},
|
},
|
||||||
duplicate_tracks: {
|
duplicate_tracks: {
|
||||||
label: 'Duplicate Tracks',
|
label: 'Duplicate Tracks',
|
||||||
icon: 'DT',
|
icon: '🔁',
|
||||||
description: 'The same track appears more than once in this album',
|
description: 'The same track appears more than once in this album',
|
||||||
applies: ['album'],
|
applies: ['album'],
|
||||||
},
|
},
|
||||||
missing_tracks: {
|
missing_tracks: {
|
||||||
label: 'Missing Tracks',
|
label: 'Missing Tracks',
|
||||||
icon: 'MT',
|
icon: '❓',
|
||||||
description: 'Tracks that should be here are missing',
|
description: 'Tracks that should be here are missing',
|
||||||
applies: ['album'],
|
applies: ['album'],
|
||||||
},
|
},
|
||||||
audio_quality: {
|
audio_quality: {
|
||||||
label: 'Audio Quality',
|
label: 'Audio Quality',
|
||||||
icon: 'AQ',
|
icon: '🎵',
|
||||||
description: 'Audio has quality issues like clipping or low bitrate',
|
description: 'Audio has quality issues like clipping or low bitrate',
|
||||||
applies: ['track'],
|
applies: ['track'],
|
||||||
},
|
},
|
||||||
wrong_album: {
|
wrong_album: {
|
||||||
label: 'Wrong Album',
|
label: 'Wrong Album',
|
||||||
icon: 'AL',
|
icon: '💿',
|
||||||
description: 'This track belongs to a different album',
|
description: 'This track belongs to a different album',
|
||||||
applies: ['track'],
|
applies: ['track'],
|
||||||
},
|
},
|
||||||
incomplete_album: {
|
incomplete_album: {
|
||||||
label: 'Incomplete Album',
|
label: 'Incomplete Album',
|
||||||
icon: 'IA',
|
icon: '⚠',
|
||||||
description: 'Album is partially downloaded',
|
description: 'Album is partially downloaded',
|
||||||
applies: ['album'],
|
applies: ['album'],
|
||||||
},
|
},
|
||||||
other: {
|
other: {
|
||||||
label: 'Other',
|
label: 'Other',
|
||||||
icon: 'OT',
|
icon: '💬',
|
||||||
description: 'Any other issue not listed above',
|
description: 'Any other issue not listed above',
|
||||||
applies: ['track', 'album', 'artist'],
|
applies: ['track', 'album', 'artist'],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ export function IssueDetailModal({
|
||||||
<img className={styles.issueHeroAlbumArt} src={issueArtwork} alt="" />
|
<img className={styles.issueHeroAlbumArt} src={issueArtwork} alt="" />
|
||||||
) : (
|
) : (
|
||||||
<div className={styles.issueHeroAlbumPlaceholder}>
|
<div className={styles.issueHeroAlbumPlaceholder}>
|
||||||
{ISSUE_CATEGORY_META[issue.category]?.icon || 'OT'}
|
{ISSUE_CATEGORY_META[issue.category]?.icon || ISSUE_CATEGORY_META.other.icon}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue