add artist list

This commit is contained in:
Kendall Garner 2025-04-23 23:27:06 -07:00
parent 14e9f6ac41
commit e84a4b20bc
No known key found for this signature in database
GPG key ID: 9355F387FE765C94
22 changed files with 1369 additions and 192 deletions

View file

@ -7,6 +7,7 @@ import {
AlbumArtistListSort,
AlbumListArgs,
AlbumListSort,
ArtistListArgs,
GenreListArgs,
GenreListSort,
LibraryItem,
@ -27,6 +28,7 @@ export const generatePageKey = (page: string, id?: string) => {
export type AlbumListFilter = Omit<AlbumListArgs['query'], 'startIndex' | 'limit'>;
export type SongListFilter = Omit<SongListArgs['query'], 'startIndex' | 'limit'>;
export type AlbumArtistListFilter = Omit<AlbumArtistListArgs['query'], 'startIndex' | 'limit'>;
export type ArtistListFilter = Omit<ArtistListArgs['query'], 'startIndex' | 'limit'>;
export type PlaylistListFilter = Omit<PlaylistListArgs['query'], 'startIndex' | 'limit'>;
export type GenreListFilter = Omit<GenreListArgs['query'], 'startIndex' | 'limit'>;
@ -34,6 +36,7 @@ type FilterType =
| AlbumListFilter
| SongListFilter
| AlbumArtistListFilter
| ArtistListFilter
| PlaylistListFilter
| GenreListFilter;
@ -509,6 +512,36 @@ export const useListStore = create<ListSlice>()(
scrollOffset: 0,
},
},
artist: {
display: ListDisplayType.POSTER,
filter: {
role: '',
sortBy: AlbumArtistListSort.NAME,
sortOrder: SortOrder.DESC,
},
grid: { itemGap: 10, itemSize: 200, scrollOffset: 0 },
table: {
autoFit: true,
columns: [
{
column: TableColumn.ROW_INDEX,
width: 50,
},
{
column: TableColumn.TITLE_COMBINED,
width: 500,
},
],
pagination: {
currentPage: 1,
itemsPerPage: 100,
totalItems: 1,
totalPages: 1,
},
rowHeight: 60,
scrollOffset: 0,
},
},
genre: {
display: ListDisplayType.TABLE,
filter: {

View file

@ -35,7 +35,7 @@ export type SidebarItemType = {
route: AppRoute | string;
};
export const sidebarItems = [
export const sidebarItems: SidebarItemType[] = [
{
disabled: true,
id: 'Now Playing',
@ -64,21 +64,21 @@ export const sidebarItems = [
{
disabled: false,
id: 'Artists',
label: i18n.t('page.sidebar.artists'),
label: i18n.t('page.sidebar.albumArtists'),
route: AppRoute.LIBRARY_ALBUM_ARTISTS,
},
{
disabled: false,
id: 'Artists-all',
label: i18n.t('page.sidebar.artists'),
route: AppRoute.LIBRARY_ARTISTS,
},
{
disabled: false,
id: 'Genres',
label: i18n.t('page.sidebar.genres'),
route: AppRoute.LIBRARY_GENRES,
},
{
disabled: true,
id: 'Folders',
label: i18n.t('page.sidebar.folders'),
route: AppRoute.LIBRARY_FOLDERS,
},
{
disabled: true,
id: 'Playlists',
@ -735,7 +735,7 @@ export const useSettingsStore = create<SettingsSlice>()(
{
merge: mergeOverridingColumns,
name: 'store_settings',
version: 8,
version: 9,
},
),
);