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

show library folder images

This commit is contained in:
Luke Pulverenti 2015-10-15 13:37:27 -04:00
parent 264dafb8a4
commit 51638b966c
2 changed files with 11 additions and 3 deletions

View file

@ -248,7 +248,7 @@
var html = ''; var html = '';
virtualFolders.push({ virtualFolders.push({
Name: 'Add Media Library', Name: Globalize.translate('ButtonAddMediaLibrary'),
icon: 'add-circle', icon: 'add-circle',
Locations: [], Locations: [],
showType: false, showType: false,
@ -361,6 +361,13 @@
html += '<div class="' + contentClass + '">'; html += '<div class="' + contentClass + '">';
var imgUrl = ''; var imgUrl = '';
if (virtualFolder.PrimaryImageItemId) {
imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
type: 'Primary'
});
}
if (imgUrl) { if (imgUrl) {
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');"></div>'; html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');"></div>';
} else { } else {
@ -374,7 +381,7 @@
html += '<iron-icon icon="' + (virtualFolder.icon || getIcon(virtualFolder.CollectionType)) + '"></iron-icon>'; html += '<iron-icon icon="' + (virtualFolder.icon || getIcon(virtualFolder.CollectionType)) + '"></iron-icon>';
if (virtualFolder.showNameWithIcon) { if (virtualFolder.showNameWithIcon) {
html += '<div style="margin-top:1em;position:absolute;width:100%;">'; html += '<div style="margin-top:1em;position:absolute;width:100%;font-weight:bold;">';
html += virtualFolder.Name; html += virtualFolder.Name;
html += "</div>"; html += "</div>";
} }

View file

@ -915,5 +915,6 @@
"TermsOfUse": "Terms of use", "TermsOfUse": "Terms of use",
"HeaderTryMultiSelect": "Try Multi-Select", "HeaderTryMultiSelect": "Try Multi-Select",
"TryMultiSelectMessage": "To edit multiple media items, just click and hold any poster and select the items you want to manage. Try it!", "TryMultiSelectMessage": "To edit multiple media items, just click and hold any poster and select the items you want to manage. Try it!",
"NumLocationsValue": "{0} folders" "NumLocationsValue": "{0} folders",
"ButtonAddMediaLibrary": "Add Media Library"
} }