This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
feishin/src/renderer/features/settings/components/general/artist-settings.tsx
2024-09-01 16:48:43 -07:00

25 lines
999 B
TypeScript

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();
return (
<DraggableItems
description="setting.artistConfiguration"
itemLabels={ARTIST_ITEMS}
setItems={setArtistItems}
settings={artistItems}
title="setting.artistConfiguration"
/>
);
};