1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Refactor: viewitemcontainer

This commit is contained in:
grafixeyehero 2023-10-04 23:14:14 +03:00 committed by Bill Thornton
parent 550ad476af
commit c61df2eb92
28 changed files with 520 additions and 1001 deletions

View file

@ -107,7 +107,7 @@ export const getFieldsQuery = (
export const getLimitQuery = () => {
return {
limit: userSettings.libraryPageSize(undefined) || undefined
limit: userSettings.libraryPageSize(undefined) ?? undefined
};
};
@ -144,12 +144,12 @@ export const getSettingsKey = (viewType: LibraryTab, parentId: ParentId) => {
return `${viewType} - ${parentId}`;
};
export const getDefaultLibraryViewSettings = (): LibraryViewSettings => {
export const getDefaultLibraryViewSettings = (viewType: LibraryTab): LibraryViewSettings => {
return {
ShowTitle: true,
ShowYear: false,
ViewMode: ViewMode.GridView,
ImageType: ImageType.Primary,
ViewMode: viewType === LibraryTab.Songs ? ViewMode.ListView : ViewMode.GridView,
ImageType: viewType === LibraryTab.Networks ? ImageType.Thumb : ImageType.Primary,
CardLayout: false,
SortBy: ItemSortBy.SortName,
SortOrder: SortOrder.Ascending,