mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
begin unifying card layouts
This commit is contained in:
parent
6503c7c6f8
commit
07d49e2573
34 changed files with 216 additions and 2228 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['libraryBrowser'], function (libraryBrowser) {
|
||||
define(['libraryBrowser', 'cardBuilder'], function (libraryBrowser, cardBuilder) {
|
||||
|
||||
return function (view, params, tabContent) {
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Movie",
|
||||
Recursive: true,
|
||||
Fields: "DateCreated,SyncInfo,ItemCounts",
|
||||
Fields: "DateCreated,SyncInfo,ItemCounts,PrimaryImageAspectRatio",
|
||||
StartIndex: 0
|
||||
},
|
||||
view: libraryBrowser.getSavedView(key) || libraryBrowser.getDefaultItemsView('Thumb', 'Thumb')
|
||||
|
@ -55,59 +55,56 @@
|
|||
var html = '';
|
||||
|
||||
var viewStyle = self.getCurrentViewStyle();
|
||||
var elem = context.querySelector('#items');
|
||||
|
||||
if (viewStyle == "Thumb") {
|
||||
html = libraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
cardBuilder.buildCards(result.Items, {
|
||||
itemsContainer: elem,
|
||||
shape: "backdrop",
|
||||
preferThumb: true,
|
||||
context: 'movies',
|
||||
showTitle: false,
|
||||
scalable: true,
|
||||
showItemCounts: true,
|
||||
centerText: true,
|
||||
lazy: true,
|
||||
overlayMoreButton: true
|
||||
});
|
||||
}
|
||||
else if (viewStyle == "ThumbCard") {
|
||||
|
||||
html = libraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
cardBuilder.buildCards(result.Items, {
|
||||
itemsContainer: elem,
|
||||
shape: "backdrop",
|
||||
preferThumb: true,
|
||||
context: 'movies',
|
||||
showTitle: false,
|
||||
scalable: true,
|
||||
showItemCounts: true,
|
||||
cardLayout: true,
|
||||
showTitle: true,
|
||||
lazy: true
|
||||
centerText: true,
|
||||
cardLayout: true
|
||||
});
|
||||
}
|
||||
else if (viewStyle == "PosterCard") {
|
||||
html = libraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
context: 'movies',
|
||||
cardBuilder.buildCards(result.Items, {
|
||||
itemsContainer: elem,
|
||||
shape: "auto",
|
||||
showTitle: false,
|
||||
scalable: true,
|
||||
showItemCounts: true,
|
||||
lazy: true,
|
||||
cardLayout: true,
|
||||
showTitle: true
|
||||
centerText: true,
|
||||
cardLayout: true
|
||||
});
|
||||
}
|
||||
else if (viewStyle == "Poster") {
|
||||
html = libraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
context: 'movies',
|
||||
centerText: true,
|
||||
cardBuilder.buildCards(result.Items, {
|
||||
itemsContainer: elem,
|
||||
shape: "auto",
|
||||
showTitle: false,
|
||||
scalable: true,
|
||||
showItemCounts: true,
|
||||
lazy: true,
|
||||
centerText: true,
|
||||
overlayMoreButton: true
|
||||
});
|
||||
}
|
||||
|
||||
var elem = context.querySelector('#items');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue