2024-09-01 16:48:43 -07:00
|
|
|
import { DraggableItems } from '/@/renderer/features/settings/components/general/draggable-items';
|
|
|
|
|
import { ArtistItem, useGeneralSettings, useSettingsStoreActions } from '/@/renderer/store';
|
|
|
|
|
|
|
|
|
|
const ARTIST_ITEMS: Array<[ArtistItem, string]> = [
|
|
|
|
|
[ArtistItem.BIOGRAPHY, 'table.column.biography'],
|
|
|
|
|
[ArtistItem.TOP_SONGS, 'page.albumArtistDetail.topSongs'],
|
|
|
|
|
[ArtistItem.RECENT_ALBUMS, 'page.albumArtistDetail.recentReleases'],
|
|
|
|
|
[ArtistItem.COMPILATIONS, 'page.albumArtistDetail.appearsOn'],
|
|
|
|
|
[ArtistItem.SIMILAR_ARTISTS, 'page.albumArtistDetail.relatedArtists'],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const ArtistSettings = () => {
|
|
|
|
|
const { artistItems } = useGeneralSettings();
|
|
|
|
|
const { setArtistItems } = useSettingsStoreActions();
|
|
|
|
|
|
2025-10-29 03:54:13 +00:00
|
|
|
const mappedArtistItems = artistItems.map((item) => ({
|
|
|
|
|
...item,
|
|
|
|
|
id: item.id as ArtistItem,
|
|
|
|
|
}));
|
|
|
|
|
|
2024-09-01 16:48:43 -07:00
|
|
|
return (
|
|
|
|
|
<DraggableItems
|
|
|
|
|
description="setting.artistConfiguration"
|
|
|
|
|
itemLabels={ARTIST_ITEMS}
|
|
|
|
|
setItems={setArtistItems}
|
2025-10-29 03:54:13 +00:00
|
|
|
settings={mappedArtistItems}
|
2024-09-01 16:48:43 -07:00
|
|
|
title="setting.artistConfiguration"
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
};
|