mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
consolidate all library icons into a single method
This commit is contained in:
parent
f3707153a0
commit
752212413c
5 changed files with 42 additions and 137 deletions
|
@ -1,5 +1,5 @@
|
|||
define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusManager', 'indicators', 'globalize', 'layoutManager', 'apphost', 'dom', 'browser', 'playbackManager', 'itemShortcuts', 'css!./card', 'paper-icon-button-light', 'programStyles'],
|
||||
function (datetime, imageLoader, connectionManager, itemHelper, focusManager, indicators, globalize, layoutManager, appHost, dom, browser, playbackManager, itemShortcuts) {
|
||||
define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusManager', 'indicators', 'globalize', 'layoutManager', 'apphost', 'dom', 'browser', 'playbackManager', 'itemShortcuts', 'scripts/imagehelper', 'css!./card', 'paper-icon-button-light', 'programStyles'],
|
||||
function (datetime, imageLoader, connectionManager, itemHelper, focusManager, indicators, globalize, layoutManager, appHost, dom, browser, playbackManager, itemShortcuts, imageHelper) {
|
||||
'use strict';
|
||||
|
||||
var devicePixelRatio = window.devicePixelRatio || 1;
|
||||
|
@ -1546,28 +1546,8 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
|
|||
}
|
||||
|
||||
function getCardDefaultText(item, options) {
|
||||
|
||||
var collectionType = item.CollectionType;
|
||||
if (collectionType === 'livetv') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
if (collectionType === 'movies') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
if (collectionType === 'tvshows') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
if (collectionType === 'homevideos' || collectionType === 'photos') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
if (collectionType === 'music') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
if (collectionType === 'musicvideos') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
}
|
||||
if (collectionType === 'books') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
if (item.CollectionType) {
|
||||
return '<i class="cardImageIcon md-icon">' + imageHelper.getLibraryIcon(item.CollectionType) + '</i>'
|
||||
}
|
||||
if (item.Type === 'MusicAlbum') {
|
||||
return '<i class="cardImageIcon md-icon"></i>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue