mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
b8b2c5ed3a
commit
5bd280d9b5
58 changed files with 62 additions and 16 deletions
|
@ -1 +1 @@
|
|||
define(["datetime","cardBuilder","apphost"],function(datetime,cardBuilder,appHost){"use strict";function enableScrollX(){return browserInfo.mobile}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getTimersHtml(timers,options){options=options||{};var i,length,items=timers.map(function(t){return t.Type="Timer",t}),groups=[],currentGroupName="",currentGroup=[];for(i=0,length=items.length;i<length;i++){var item=items[i],dateText="";if(options.indexByDate!==!1&&item.StartDate)try{var premiereDate=datetime.parseISO8601Date(item.StartDate,!0);dateText=LibraryBrowser.getFutureDateText(premiereDate,!0)}catch(err){}dateText!=currentGroupName?(currentGroup.length&&groups.push({name:currentGroupName,items:currentGroup}),currentGroupName=dateText,currentGroup=[item]):currentGroup.push(item)}currentGroup.length&&groups.push({name:currentGroupName,items:currentGroup});var html="";for(i=0,length=groups.length;i<length;i++){var group=groups[i];group.name&&(html+='<div class="homePageSection">',html+='<h1 class="listHeader">'+group.name+"</h1>"),html+=enableScrollX()?'<div is="emby-itemscontainer" class="itemsContainer hiddenScrollX">':'<div is="emby-itemscontainer" class="itemsContainer vertical-wrap">';var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=appHost.preferVisualCards||supportsImageAnalysis;html+=cardBuilder.getCardsHtml({items:group.items,shape:getBackdropShape(),showParentTitleOrTitle:!0,showAirTime:!0,showAirEndTime:!0,showChannelName:!0,cardLayout:cardLayout,centerText:!cardLayout,vibrant:supportsImageAnalysis,action:"edit",cardFooterAside:"none",preferThumb:!0,coverImage:!0,overlayText:!1}),html+="</div>",group.name&&(html+="</div>")}return Promise.resolve(html)}window.LiveTvHelpers={getTimersHtml:getTimersHtml}});
|
||||
define(["datetime","cardBuilder","apphost"],function(datetime,cardBuilder,appHost){"use strict";function enableScrollX(){return browserInfo.mobile}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getTimersHtml(timers,options){options=options||{};var i,length,items=timers.map(function(t){return t.Type="Timer",t}),groups=[],currentGroupName="",currentGroup=[];for(i=0,length=items.length;i<length;i++){var item=items[i],dateText="";if(options.indexByDate!==!1&&item.StartDate)try{var premiereDate=datetime.parseISO8601Date(item.StartDate,!0);dateText=LibraryBrowser.getFutureDateText(premiereDate,!0)}catch(err){}dateText!=currentGroupName?(currentGroup.length&&groups.push({name:currentGroupName,items:currentGroup}),currentGroupName=dateText,currentGroup=[item]):currentGroup.push(item)}currentGroup.length&&groups.push({name:currentGroupName,items:currentGroup});var html="";for(i=0,length=groups.length;i<length;i++){var group=groups[i];group.name&&(html+='<div class="homePageSection">',html+='<h1 class="listHeader">'+group.name+"</h1>"),html+=enableScrollX()?'<div is="emby-itemscontainer" class="itemsContainer hiddenScrollX">':'<div is="emby-itemscontainer" class="itemsContainer vertical-wrap">';var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=appHost.preferVisualCards||supportsImageAnalysis;cardLayout=!1,html+=cardBuilder.getCardsHtml({items:group.items,shape:getBackdropShape(),showParentTitleOrTitle:!0,showAirTime:!0,showAirEndTime:!0,showChannelName:!0,cardLayout:cardLayout,centerText:!cardLayout,vibrant:cardLayout&&supportsImageAnalysis,action:"edit",cardFooterAside:"none",preferThumb:!0,coverImage:!0,allowBottomPadding:!enableScrollX(),overlayText:!1}),html+="</div>",group.name&&(html+="</div>")}return Promise.resolve(html)}window.LiveTvHelpers={getTimersHtml:getTimersHtml}});
|
Loading…
Add table
Add a link
Reference in a new issue