mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-03 03:50:02 +03:00
Extend to all other library types and order dropdowns
This commit is contained in:
@@ -170,6 +170,11 @@ export const LibraryRoutes: LibraryRoute[] = [
|
||||
index: 6,
|
||||
label: 'Genres',
|
||||
view: LibraryTab.Genres
|
||||
},
|
||||
{
|
||||
index: 7,
|
||||
label: 'Collections',
|
||||
view: LibraryTab.Collections
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -263,6 +268,11 @@ export const LibraryRoutes: LibraryRoute[] = [
|
||||
index: 2,
|
||||
label: 'HeaderVideos',
|
||||
view: LibraryTab.MusicVideos
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
label: 'Playlists',
|
||||
view: LibraryTab.Playlists
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -300,6 +310,16 @@ export const LibraryRoutes: LibraryRoute[] = [
|
||||
index: 2,
|
||||
label: 'HeaderMedia',
|
||||
view: LibraryTab.Mixed
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
label: 'Collections',
|
||||
view: LibraryTab.Collections
|
||||
},
|
||||
{
|
||||
index: 4,
|
||||
label: 'Playlists',
|
||||
view: LibraryTab.Playlists
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -29,10 +29,29 @@ const mixedTabContent: LibraryTabContent = {
|
||||
itemType: [BaseItemKind.Movie, BaseItemKind.Series]
|
||||
};
|
||||
|
||||
const collectionsTabContent: LibraryTabContent = {
|
||||
viewType: LibraryTab.Collections,
|
||||
collectionType: null,
|
||||
isBtnNewCollectionEnabled: true,
|
||||
itemType: [BaseItemKind.BoxSet],
|
||||
noItemsMessage: 'MessageNoCollectionsAvailable'
|
||||
};
|
||||
|
||||
const playlistsTabContent: LibraryTabContent = {
|
||||
viewType: LibraryTab.Playlists,
|
||||
isBtnFilterEnabled: false,
|
||||
isBtnGridListEnabled: false,
|
||||
isBtnNewPlaylistEnabled: true,
|
||||
isAlphabetPickerEnabled: false,
|
||||
itemType: [BaseItemKind.Playlist]
|
||||
};
|
||||
|
||||
const mixedTabMapping: LibraryTabMapping = {
|
||||
0: foldersTabContent,
|
||||
1: suggestionsTabContent,
|
||||
2: mixedTabContent
|
||||
2: mixedTabContent,
|
||||
3: collectionsTabContent,
|
||||
4: playlistsTabContent
|
||||
};
|
||||
|
||||
const Mixed: FC = () => {
|
||||
|
||||
@@ -57,6 +57,14 @@ const genresTabContent: LibraryTabContent = {
|
||||
itemType: [BaseItemKind.MusicAlbum]
|
||||
};
|
||||
|
||||
const collectionsTabContent: LibraryTabContent = {
|
||||
viewType: LibraryTab.Collections,
|
||||
collectionType: CollectionType.Music,
|
||||
isBtnNewCollectionEnabled: true,
|
||||
itemType: [BaseItemKind.BoxSet],
|
||||
noItemsMessage: 'MessageNoCollectionsAvailable'
|
||||
};
|
||||
|
||||
const musicTabMapping: LibraryTabMapping = {
|
||||
0: albumsTabContent,
|
||||
1: suggestionsTabContent,
|
||||
@@ -64,7 +72,8 @@ const musicTabMapping: LibraryTabMapping = {
|
||||
3: artistsTabContent,
|
||||
4: playlistsTabContent,
|
||||
5: songsTabContent,
|
||||
6: genresTabContent
|
||||
6: genresTabContent,
|
||||
7: collectionsTabContent
|
||||
};
|
||||
|
||||
const Music: FC = () => {
|
||||
|
||||
@@ -30,10 +30,20 @@ const musicVideosTabContent: LibraryTabContent = {
|
||||
itemType: [BaseItemKind.MusicVideo]
|
||||
};
|
||||
|
||||
const playlistsTabContent: LibraryTabContent = {
|
||||
viewType: LibraryTab.Playlists,
|
||||
isBtnFilterEnabled: false,
|
||||
isBtnGridListEnabled: false,
|
||||
isBtnNewPlaylistEnabled: true,
|
||||
isAlphabetPickerEnabled: false,
|
||||
itemType: [BaseItemKind.Playlist]
|
||||
};
|
||||
|
||||
const musicVideosTabMapping: LibraryTabMapping = {
|
||||
0: foldersTabContent,
|
||||
1: suggestionsTabContent,
|
||||
2: musicVideosTabContent
|
||||
2: musicVideosTabContent,
|
||||
3: playlistsTabContent
|
||||
};
|
||||
|
||||
const MusicVideos: FC = () => {
|
||||
|
||||
@@ -66,14 +66,14 @@ function getLandingScreenOptions(type) {
|
||||
name: globalize.translate('Favorites'),
|
||||
value: LibraryTab.Favorites
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Collections'),
|
||||
value: LibraryTab.Collections
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Genres'),
|
||||
value: LibraryTab.Genres
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Collections'),
|
||||
value: LibraryTab.Collections
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Playlists'),
|
||||
value: LibraryTab.Playlists
|
||||
@@ -94,10 +94,6 @@ function getLandingScreenOptions(type) {
|
||||
name: globalize.translate('TabUpcoming'),
|
||||
value: LibraryTab.Upcoming
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Genres'),
|
||||
value: LibraryTab.Genres
|
||||
},
|
||||
{
|
||||
name: globalize.translate('TabNetworks'),
|
||||
value: LibraryTab.Networks
|
||||
@@ -106,6 +102,10 @@ function getLandingScreenOptions(type) {
|
||||
name: globalize.translate('Episodes'),
|
||||
value: LibraryTab.Episodes
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Genres'),
|
||||
value: LibraryTab.Genres
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Collections'),
|
||||
value: LibraryTab.Collections
|
||||
@@ -134,10 +134,6 @@ function getLandingScreenOptions(type) {
|
||||
name: globalize.translate('Artists'),
|
||||
value: LibraryTab.Artists
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Playlists'),
|
||||
value: LibraryTab.Playlists
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Songs'),
|
||||
value: LibraryTab.Songs
|
||||
@@ -145,6 +141,14 @@ function getLandingScreenOptions(type) {
|
||||
{
|
||||
name: globalize.translate('Genres'),
|
||||
value: LibraryTab.Genres
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Collections'),
|
||||
value: LibraryTab.Collections
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Playlists'),
|
||||
value: LibraryTab.Playlists
|
||||
}
|
||||
);
|
||||
} else if (type === 'livetv') {
|
||||
@@ -209,6 +213,10 @@ function getLandingScreenOptions(type) {
|
||||
{
|
||||
name: globalize.translate('HeaderVideos'),
|
||||
value: LibraryTab.MusicVideos
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Playlists'),
|
||||
value: LibraryTab.Playlists
|
||||
}
|
||||
);
|
||||
} else if (type === 'mixed') {
|
||||
@@ -225,6 +233,14 @@ function getLandingScreenOptions(type) {
|
||||
{
|
||||
name: globalize.translate('HeaderMedia'),
|
||||
value: LibraryTab.Mixed
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Collections'),
|
||||
value: LibraryTab.Collections
|
||||
},
|
||||
{
|
||||
name: globalize.translate('Playlists'),
|
||||
value: LibraryTab.Playlists
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user