mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into patch-2
This commit is contained in:
commit
84d14c31aa
17 changed files with 614 additions and 369 deletions
|
@ -125,7 +125,8 @@ function renderSection(item, element, type) {
|
|||
ArtistIds: '',
|
||||
AlbumArtistIds: '',
|
||||
Limit: 10,
|
||||
SortBy: 'SortName'
|
||||
SortOrder: 'Descending,Desending,Ascending',
|
||||
SortBy: 'PremiereDate,ProductionYear,SortName'
|
||||
}, {
|
||||
shape: 'overflowPortrait',
|
||||
showTitle: true,
|
||||
|
@ -194,7 +195,7 @@ function renderSection(item, element, type) {
|
|||
PersonTypes: '',
|
||||
ArtistIds: '',
|
||||
AlbumArtistIds: '',
|
||||
SortOrder: 'Descending',
|
||||
SortOrder: 'Descending,Desending,Ascending',
|
||||
SortBy: 'PremiereDate,ProductionYear,Sortname'
|
||||
}, {
|
||||
shape: 'overflowSquare',
|
||||
|
|
|
@ -622,6 +622,21 @@ export class UserSettings {
|
|||
getFilter(key) {
|
||||
return this.get(key, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current sort values (Legacy - Non-JSON)
|
||||
* (old views such as list.js [Photos] will
|
||||
* use this one)
|
||||
* @param {string} key - Filter key.
|
||||
* @param {string} defaultSortBy - Default SortBy value.
|
||||
* @return {Object} sortOptions object
|
||||
*/
|
||||
getSortValuesLegacy(key, defaultSortBy) {
|
||||
return {
|
||||
sortBy: this.getFilter(key + '-sortby') || defaultSortBy,
|
||||
sortOrder: this.getFilter(key + '-sortorder') === 'Descending' ? 'Descending' : 'Ascending'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export const currentSettings = new UserSettings;
|
||||
|
@ -672,3 +687,4 @@ export const customCss = currentSettings.customCss.bind(currentSettings);
|
|||
export const disableCustomCss = currentSettings.disableCustomCss.bind(currentSettings);
|
||||
export const getSavedView = currentSettings.getSavedView.bind(currentSettings);
|
||||
export const saveViewSetting = currentSettings.saveViewSetting.bind(currentSettings);
|
||||
export const getSortValuesLegacy = currentSettings.getSortValuesLegacy.bind(currentSettings);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue