Merge pull request 'futonbeta' (#6) from futonbeta into main
Reviewed-on: http://gitea.genosjr.moe/l4kr/dashboard-ui/pulls/6
This commit is contained in:
commit
7e7c00ffae
@ -10,6 +10,7 @@
|
||||
}
|
||||
.topDetailsMain {
|
||||
overflow: hidden;
|
||||
margin-top: 11em;
|
||||
}
|
||||
.topDetailsMain.padded-left {
|
||||
-webkit-padding-start: 2.5%;
|
||||
@ -80,6 +81,7 @@
|
||||
.detailImageContainer-main.detailImageContainer-backdrop {
|
||||
width: 28vw;
|
||||
width: clamp(20vw, 49.5em, 28vw);
|
||||
top: 5em;
|
||||
}
|
||||
.detailImageContainer-main.detailImageContainer-banner {
|
||||
width: 28vw;
|
||||
@ -264,13 +266,60 @@
|
||||
.detailButton {
|
||||
margin-top: 0.75em !important;
|
||||
margin-bottom: 0.75em !important;
|
||||
-webkit-margin-start: 0 !important;
|
||||
-webkit-marg0in-start: 0 !important;
|
||||
margin-inline-start: 0 !important;
|
||||
-webkit-margin-end: 0.5em !important;
|
||||
margin-inline-end: 0.5em !important;
|
||||
-webkit-flex-shrink: 0;
|
||||
flex-shrink: 0;
|
||||
box-shadow: none !important;
|
||||
box-shadow: 0px 3px 15px rgba(0,0,0,0.4); !important;
|
||||
opacity 0.2s ease-out;
|
||||
color: #cecbcb;
|
||||
}
|
||||
.detailButton:before {
|
||||
content: '';
|
||||
background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left:-2px;
|
||||
background-size: 400%;
|
||||
z-index: -1;
|
||||
filter: blur(5px);
|
||||
width: calc(100% + 4px);
|
||||
height: calc(100% + 4px);
|
||||
animation: glowing 20s linear infinite;
|
||||
opacity: 0;
|
||||
transition: opacity ease-in-out;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.detailButton:active {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.detailButton:active:after {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.detailButton:hover:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.detailButton:after {
|
||||
z-index: -1;
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #111;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
@keyframes glowing {
|
||||
0% { background-position: 0 0; }
|
||||
50% { background-position: 400% 0; }
|
||||
100% { background-position: 0 0; }
|
||||
}
|
||||
.detailButton.raised {
|
||||
-webkit-justify-content: center;
|
||||
@ -354,8 +403,9 @@
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
.detailTextContainer {
|
||||
margin: 0 -1em;
|
||||
padding: 0 1em;
|
||||
margin: 0 0;
|
||||
padding: 5em 1em;
|
||||
padding-bottom: 20em;
|
||||
}
|
||||
.detailTextContainer-extrapadding {
|
||||
padding: 0 1.6em;
|
||||
|
||||
@ -40,13 +40,13 @@
|
||||
|
||||
<form class="trackSelections flex align-items-center flex-wrap-wrap hide focuscontainer-x reduce-font-size-tv" style="padding: 0;max-width:initial;">
|
||||
<div class="selectContainer selectContainer-inline selectSourceContainer hide trackSelectionFieldContainer flex-shrink-zero">
|
||||
<select is="emby-select" class="selectSource detailTrackSelect emby-select-inline" label="${LabelVersion}"></select>
|
||||
<select hidden="emby-select" class="selectSource detailTrackSelect emby-select-inline" label="${}"></select>
|
||||
</div>
|
||||
<div class="selectContainer selectContainer-inline selectVideoContainer hide trackSelectionFieldContainer flex-shrink-zero">
|
||||
<select is="emby-select" class="selectVideo detailTrackSelect emby-select-inline" label="${LabelVideo}"></select>
|
||||
<select hidden="emby-select" class="selectVideo detailTrackSelect emby-select-inline" label="${}"></select>
|
||||
</div>
|
||||
<div class="selectContainer selectContainer-inline selectAudioContainer hide trackSelectionFieldContainer flex-shrink-zero">
|
||||
<select is="emby-select" class="selectAudio detailTrackSelect emby-select-inline" label="${LabelAudio}" data-menu="custom"></select>
|
||||
<select hidden="emby-select" class="selectAudio detailTrackSelect emby-select-inline" label="${}" data-menu="custom"></select>
|
||||
</div>
|
||||
<div class="selectContainer selectContainer-inline selectSubtitlesContainer hide trackSelectionFieldContainer">
|
||||
<select is="emby-select" class="selectSubtitles detailTrackSelect emby-select-inline" label="${LabelSubtitles}" data-menu="custom"></select>
|
||||
|
||||
@ -1001,9 +1001,12 @@
|
||||
display: flex;
|
||||
}
|
||||
.card-hoverable:hover .cardOverlayContainer {
|
||||
opacity: 1;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.detailImageContainerCard:hover {
|
||||
transform: none;
|
||||
}
|
||||
.chkCardSelect {
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -333,7 +333,7 @@
|
||||
"HeaderVideoPlayback": "Video Playback",
|
||||
"TV": "TV",
|
||||
"HeaderEmbyConnect": "Emby Connect",
|
||||
"Seasons": "Seasons",
|
||||
"Seasons": "Seasons ⇩",
|
||||
"OneTrack": "1 Track",
|
||||
"OneSeason": "1 Season",
|
||||
"Libraries": "Libraries",
|
||||
@ -676,7 +676,7 @@
|
||||
"Movies": "Movies",
|
||||
"Music": "Music",
|
||||
"Kids": "Kids",
|
||||
"MoreFromValue": "More from {0}",
|
||||
"MoreFromValue": "More from {0} ⇩",
|
||||
"DiedValue": "Died: {0}",
|
||||
"BornValue": "Born: {0}",
|
||||
"BornValueWithPlace": "Born: {0} in {1}",
|
||||
@ -739,9 +739,9 @@
|
||||
"Accept": "Accept",
|
||||
"Reject": "Reject",
|
||||
"Connect": "Connect",
|
||||
"HeaderMyMedia": "My Media",
|
||||
"HeaderMyMedia": "Anime Library",
|
||||
"HeaderMyMediaSmall": "My Media (small)",
|
||||
"LatestFromLibrary": "Latest {0}",
|
||||
"LatestFromLibrary": "Latest Anime {0}",
|
||||
"HeaderLatestEpisodes": "Latest Episodes",
|
||||
"ContinuePlaying": "Continue playing",
|
||||
"ContinueWatching": "Continue watching",
|
||||
@ -1193,4 +1193,4 @@
|
||||
"PasswordForFolderHelp": "The password required to access this folder on your network (if applicable).",
|
||||
"ShowMediaInfoOnDetailScreens": "Show full media info on audio and video detail screens",
|
||||
"ForgotPasswordNoUserFound": "No users were found with the entered name. Please try again, or leave the name blank to reset the password for all users on this server."
|
||||
}
|
||||
}
|
||||
|
||||
@ -1 +1,170 @@
|
||||
.emby-select{display:block;margin:0;margin-bottom:0!important;font-size:110%;font-family:inherit;font-weight:inherit;padding-top:.5em;padding-bottom:.5em;-webkit-padding-start:.9ch;padding-inline-start:.9ch;-webkit-padding-end:3.4ch;padding-inline-end:3.4ch;box-sizing:border-box;outline:0!important;-webkit-tap-highlight-color:transparent;width:100%;border-radius:.3em;-webkit-appearance:none;appearance:none;letter-spacing:inherit}.emby-select-nopointer{pointer-events:none}.emby-select[disabled]{background:0 0!important;border-color:transparent!important;color:inherit!important;-webkit-appearance:none;appearance:none;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;box-shadow:none!important}.emby-select[multiple] option{display:none!important;visibility:hidden!important}.emby-select-inline{font-size:inherit;border-radius:100em}.emby-select-inline[disabled]{padding:.2em 0;border:0;text-shadow:inherit}.emby-select-tv-inline{width:auto;-webkit-padding-end:.5em;padding-inline-end:.5em}.emby-select::-moz-focus-inner{border:0}.emby-select-focusscale{transition:-webkit-transform .2s ease-out!important;transition:transform .2s ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.emby-select-focusscale:focus{-webkit-transform:scale(1.02);transform:scale(1.02);z-index:1}.emby-select-inline.emby-select-focusscale:focus{-webkit-transform:scale(1.14);transform:scale(1.14);z-index:1}.selectContainer{margin-bottom:1.5em;position:relative}.selectContainer-inline{display:-webkit-inline-flex;display:inline-flex;margin-bottom:0;-webkit-align-items:center;align-items:center}.emby-select-wrapper{position:relative}.selectLabelText{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-bottom:.1em}.selectLabelText-inline{margin-bottom:0;-webkit-margin-end:.5em;margin-inline-end:.5em}.selectLabel-inline{margin-bottom:0;-webkit-flex-shrink:0;flex-shrink:0;display:-webkit-flex;display:flex;-webkit-align-items:baseline;align-items:baseline}.emby-select[multiple]{color:transparent!important;max-height:2.5em}.emby-select-selectedNameContainer{position:absolute;top:0;bottom:0;left:.5em;right:2em;inset-inline-start:.5em;inset-inline-end:2em;color:inherit;pointer-events:none;font-size:110%;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:flex;text-shadow:none}.emby-select-selectedName{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selectArrowContainer{position:absolute;display:-webkit-flex;display:flex;top:0;bottom:0;right:.3em;inset-inline-start:initial;inset-inline-end:.3em;color:inherit;pointer-events:none;-webkit-align-items:center;align-items:center;text-shadow:none}.selectArrowContainer-inline{top:initial;bottom:.38em;font-size:90%}.emby-select-inline.emby-select-tv+.selectArrowContainer{display:none}.emby-select[disabled]+.selectArrowContainer{display:none}.selectArrow{font-size:1.7em}.emby-select-iconbutton{-webkit-align-self:flex-end;align-self:flex-end}
|
||||
.emby-select {
|
||||
display: block;
|
||||
margin: 0;
|
||||
margin-bottom: 0 !important;
|
||||
font-size: 110%;
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
-webkit-padding-start: 0.9ch;
|
||||
padding-inline-start: 0.9ch;
|
||||
-webkit-padding-end: 3.4ch;
|
||||
padding-inline-end: 3.4ch;
|
||||
box-sizing: border-box;
|
||||
outline: 0 !important;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
width: 100%;
|
||||
border-radius: 0.3em;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
.emby-select-nopointer {
|
||||
pointer-events: none;
|
||||
}
|
||||
.emby-select[disabled] {
|
||||
background: 0 0 !important;
|
||||
border-color: transparent !important;
|
||||
color: inherit !important;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
-webkit-backdrop-filter: none !important;
|
||||
backdrop-filter: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.emby-select[multiple] option {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
.emby-select-inline {
|
||||
font-size: inherit;
|
||||
border-radius: 100em;
|
||||
}
|
||||
.emby-select-inline[disabled] {
|
||||
padding: 0.2em 0;
|
||||
border: 0;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
.emby-select-tv-inline {
|
||||
width: auto;
|
||||
-webkit-padding-end: 0.5em;
|
||||
padding-inline-end: 0.5em;
|
||||
}
|
||||
.emby-select::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
.emby-select-focusscale {
|
||||
transition: -webkit-transform 0.2s ease-out !important;
|
||||
transition: transform 0.2s ease-out !important;
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center;
|
||||
}
|
||||
.emby-select-focusscale:focus {
|
||||
-webkit-transform: scale(1.02);
|
||||
transform: scale(1.02);
|
||||
z-index: 1;
|
||||
}
|
||||
.emby-select-inline.emby-select-focusscale:focus {
|
||||
-webkit-transform: scale(1.14);
|
||||
transform: scale(1.14);
|
||||
z-index: 1;
|
||||
}
|
||||
.selectContainer {
|
||||
margin-bottom: 1.5em;
|
||||
position: relative;
|
||||
}
|
||||
.selectContainer-inline {
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
margin-bottom: 0;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
.emby-select-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.selectLabelText {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
.selectLabelText-inline {
|
||||
margin-bottom: 0;
|
||||
-webkit-margin-end: 0.5em;
|
||||
margin-inline-end: 0.5em;
|
||||
margin-left: -2.3em;
|
||||
margin-top: 1em;
|
||||
font-size: 1.2em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.selectLabel-inline {
|
||||
margin-bottom: 0;
|
||||
-webkit-flex-shrink: 0;
|
||||
flex-shrink: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-align-items: baseline;
|
||||
align-items: baseline;
|
||||
}
|
||||
.emby-select[multiple] {
|
||||
color: transparent !important;
|
||||
max-height: 2.5em;
|
||||
}
|
||||
.emby-select-selectedNameContainer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0.5em;
|
||||
right: 2em;
|
||||
inset-inline-start: 0.5em;
|
||||
inset-inline-end: 2em;
|
||||
color: inherit;
|
||||
pointer-events: none;
|
||||
font-size: 110%;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
text-shadow: none;
|
||||
}
|
||||
.emby-select-selectedName {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.selectArrowContainer {
|
||||
position: absolute;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0.3em;
|
||||
inset-inline-start: initial;
|
||||
inset-inline-end: 0.3em;
|
||||
color: inherit;
|
||||
pointer-events: none;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
text-shadow: none;
|
||||
}
|
||||
.selectArrowContainer-inline {
|
||||
top: initial;
|
||||
bottom: 0.38em;
|
||||
font-size: 90%;
|
||||
}
|
||||
.emby-select-inline.emby-select-tv + .selectArrowContainer {
|
||||
display: none;
|
||||
}
|
||||
.emby-select[disabled] + .selectArrowContainer {
|
||||
display: none;
|
||||
}
|
||||
.selectArrow {
|
||||
font-size: 1.7em;
|
||||
}
|
||||
.emby-select-iconbutton {
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,69 @@
|
||||
define(["exports","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/viewmanager/baseview.js","./../modules/focusmanager.js","./../modules/emby-apiclient/connectionmanager.js","./searchfields.js","./searchresults.js","./../modules/emby-apiclient/events.js"],function(_exports,_embyScroller,_baseview,_focusmanager,_connectionmanager,_searchfields,_searchresults,_events){function SearchView(view,params){_baseview.default.apply(this,arguments);var self=this;self.searchFields=new _searchfields.default({serverId:params.serverId||_connectionmanager.default.currentApiClient().serverId(),element:view.querySelector(".searchFields")}),self.searchResults=new _searchresults.default({element:view.querySelector(".searchResults"),serverId:params.serverId||_connectionmanager.default.currentApiClient().serverId(),parentId:params.parentId,collectionType:params.collectionType,requestedItemFields:this.getRequestedItemFields()}),_events.default.on(self.searchFields,"search",function(e,value){self.searchResults.search(value)})}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(SearchView.prototype,_baseview.default.prototype),SearchView.prototype.onPause=function(){_baseview.default.prototype.onPause.apply(this,arguments),this.searchFields&&this.searchFields.pause()},SearchView.prototype.onInputCommand=function(e){"search"===e.detail.command?(_focusmanager.default.focus(this.view.querySelector(".searchfields-txtSearch")),e.preventDefault()):_baseview.default.prototype.onInputCommand.apply(this,arguments)},SearchView.prototype.onResume=function(options){_baseview.default.prototype.onResume.apply(this,arguments),this.searchFields&&this.searchFields.resume(options)},SearchView.prototype.destroy=function(){_baseview.default.prototype.destroy.apply(this,arguments),this.searchFields&&(this.searchFields.destroy(),this.searchFields=null),this.searchResults&&(this.searchResults.destroy(),this.searchResults=null)},_exports.default=SearchView});
|
||||
define([
|
||||
"exports",
|
||||
"./../modules/emby-elements/emby-scroller/emby-scroller.js",
|
||||
"./../modules/viewmanager/baseview.js",
|
||||
"./../modules/focusmanager.js",
|
||||
"./../modules/emby-apiclient/connectionmanager.js",
|
||||
"./searchfields.js",
|
||||
"./searchresults.js",
|
||||
"./../modules/emby-apiclient/events.js",
|
||||
], function (
|
||||
_exports,
|
||||
_embyScroller,
|
||||
_baseview,
|
||||
_focusmanager,
|
||||
_connectionmanager,
|
||||
_searchfields,
|
||||
_searchresults,
|
||||
_events,
|
||||
) {
|
||||
function SearchView(view, params) {
|
||||
_baseview.default.apply(this, arguments);
|
||||
var self = this;
|
||||
(self.searchFields = new _searchfields.default({
|
||||
serverId:
|
||||
params.serverId ||
|
||||
_connectionmanager.default.currentApiClient().serverId(),
|
||||
element: view.querySelector(".searchFields"),
|
||||
})),
|
||||
(self.searchResults = new _searchresults.default({
|
||||
element: view.querySelector(".searchResults"),
|
||||
serverId:
|
||||
params.serverId ||
|
||||
_connectionmanager.default.currentApiClient().serverId(),
|
||||
parentId: params.parentId,
|
||||
collectionType: params.collectionType,
|
||||
requestedItemFields: this.getRequestedItemFields(),
|
||||
})),
|
||||
_events.default.on(self.searchFields, "search", function (e, value) {
|
||||
self.searchResults.search(value);
|
||||
});
|
||||
}
|
||||
Object.defineProperty(_exports, "__esModule", { value: !0 }),
|
||||
(_exports.default = void 0),
|
||||
Object.assign(SearchView.prototype, _baseview.default.prototype),
|
||||
(SearchView.prototype.onPause = function () {
|
||||
_baseview.default.prototype.onPause.apply(this, arguments),
|
||||
this.searchFields && this.searchFields.pause();
|
||||
}),
|
||||
(SearchView.prototype.onInputCommand = function (e) {
|
||||
"search" === e.detail.command
|
||||
? (_focusmanager.default.focus(
|
||||
this.view.querySelector(".searchfields-txtSearch"),
|
||||
),
|
||||
e.preventDefault())
|
||||
: _baseview.default.prototype.onInputCommand.apply(this, arguments);
|
||||
}),
|
||||
(SearchView.prototype.onResume = function (options) {
|
||||
_baseview.default.prototype.onResume.apply(this, arguments),
|
||||
this.searchFields && this.searchFields.resume(options);
|
||||
}),
|
||||
(SearchView.prototype.destroy = function () {
|
||||
_baseview.default.prototype.destroy.apply(this, arguments),
|
||||
this.searchFields &&
|
||||
(this.searchFields.destroy(), (this.searchFields = null)),
|
||||
this.searchResults &&
|
||||
(this.searchResults.destroy(), (this.searchResults = null));
|
||||
}),
|
||||
(_exports.default = SearchView);
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,178 @@
|
||||
define(["exports","./../modules/emby-apiclient/connectionmanager.js","./../modules/layoutmanager.js","./../modules/cardbuilder/cardbuilder.js","./../modules/tabbedview/basetab.js","./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js","./../modules/emby-elements/emby-scroller/emby-scroller.js"],function(_exports,_connectionmanager,_layoutmanager,_cardbuilder,_basetab,_embyItemscontainer,_embyScroller){function enableScrollX(section){return"resume"===section||_layoutmanager.default.tv}function TvSuggestionsTab(view,params){_basetab.default.apply(this,arguments),this.view=view,this.params=params,this.apiClient=_connectionmanager.default.getApiClient(params.serverId),function(view){for(var containers=view.querySelectorAll(".autoScrollSection"),i=0,length=containers.length;i<length;i++){var section=containers[i],html=void 0,sectionType=section.getAttribute("data-section"),commands="resume"===sectionType?' data-commands="removefromresume"':"";html=enableScrollX(sectionType)?'<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale padded-left padded-left-page padded-right" data-mousewheel="false" data-focusscroll="true"><div is="emby-itemscontainer"'+commands+' class="itemsContainer scrollSlider focuscontainer-x" data-monitor="videoplayback,markplayed" data-virtualscrolllayout="horizontal-grid"></div></div>':'<div is="emby-itemscontainer"'+commands+' class="itemsContainer padded-left padded-left-page padded-right vertical-wrap focuscontainer-x" data-monitor="videoplayback,markplayed"></div>',section.insertAdjacentHTML("beforeend",html)}}(view),this.resumeItemsContainer=view.querySelector(".resumeSection .itemsContainer"),this.resumeItemsContainer.fetchData=function(query){var apiClient=this.apiClient,parentId=this.params.parentId;return apiClient.getResumableItems(apiClient.getCurrentUserId(),Object.assign({IncludeItemTypes:"Episode",Fields:this.getRequestedItemFields()+",PrimaryImageAspectRatio",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:this.getRequestedImageTypes()},query))}.bind(this),this.resumeItemsContainer.getListOptions=function(){return{renderer:_cardbuilder.default,options:{preferThumb:!0,shape:"backdrop",scalable:!0,fields:this.enableFocusPreview()?[]:["ParentName","Name"],centerText:!0,overlayPlayButton:!0,cardLayout:!1,focusTransformTitleAdjust:!0,animateProgressBar:!0},virtualScrollLayout:"horizontal-grid"}}.bind(this),this.resumeItemsContainer.parentContainer=view.querySelector(".resumeSection"),this.addFocusBehavior(this.resumeItemsContainer),this.latestItemsContainer=view.querySelector(".latestSection .itemsContainer"),this.latestItemsContainer.fetchData=function(query){var parentId=this.params.parentId;return this.apiClient.getLatestItems(Object.assign({IncludeItemTypes:"Episode",Limit:30,Fields:this.getRequestedItemFields()+",PrimaryImageAspectRatio",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:this.getRequestedImageTypes(),GroupItems:!1}),query)}.bind(this),this.latestItemsContainer.getListOptions=function(){return{renderer:_cardbuilder.default,options:{preferThumb:!0,shape:"backdrop",scalable:!0,fields:this.enableFocusPreview()?[]:["ParentName","Name"],centerText:!0,overlayPlayButton:!0,cardLayout:!1,focusTransformTitleAdjust:!0},virtualScrollLayout:enableScrollX("latest")?"horizontal-grid":"vertical-grid"}}.bind(this),this.latestItemsContainer.parentContainer=view.querySelector(".latestSection"),this.addFocusBehavior(this.latestItemsContainer),params.parentId&&(this.resumeItemsContainer.setAttribute("data-parentid",params.parentId),this.latestItemsContainer.setAttribute("data-parentid",params.parentId))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(TvSuggestionsTab.prototype,_basetab.default.prototype),TvSuggestionsTab.prototype.supportsFocusPreview=function(){return!0},TvSuggestionsTab.prototype.enableFocusPreview=function(){return _layoutmanager.default.tv&&this.supportsFocusPreview()},TvSuggestionsTab.prototype.onResume=function(options){_basetab.default.prototype.onResume.apply(this,arguments);var promises=[],instance=(promises.push(this.resumeItemsContainer.resume(options)),promises.push(this.latestItemsContainer.resume(options)),this);Promise.all(promises).then(function(){options.autoFocus&&instance.autoFocus(),instance.fillFocusPreviewIfNeeded()})},TvSuggestionsTab.prototype.onPause=function(){_basetab.default.prototype.onPause.apply(this,arguments),this.resumeItemsContainer.pause(),this.latestItemsContainer.pause()},TvSuggestionsTab.prototype.destroy=function(){_basetab.default.prototype.destroy.apply(this,arguments),this.view=null,this.params=null,this.apiClient=null,this.resumeItemsContainer=null,this.latestItemsContainer=null},_exports.default=TvSuggestionsTab});
|
||||
define([
|
||||
"exports",
|
||||
"./../modules/emby-apiclient/connectionmanager.js",
|
||||
"./../modules/layoutmanager.js",
|
||||
"./../modules/cardbuilder/cardbuilder.js",
|
||||
"./../modules/tabbedview/basetab.js",
|
||||
"./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js",
|
||||
"./../modules/emby-elements/emby-scroller/emby-scroller.js",
|
||||
], function (
|
||||
_exports,
|
||||
_connectionmanager,
|
||||
_layoutmanager,
|
||||
_cardbuilder,
|
||||
_basetab,
|
||||
_embyItemscontainer,
|
||||
_embyScroller,
|
||||
) {
|
||||
function enableScrollX(section) {
|
||||
return "resume" === section || _layoutmanager.default.tv;
|
||||
}
|
||||
function TvSuggestionsTab(view, params) {
|
||||
_basetab.default.apply(this, arguments),
|
||||
(this.view = view),
|
||||
(this.params = params),
|
||||
(this.apiClient = _connectionmanager.default.getApiClient(
|
||||
params.serverId,
|
||||
)),
|
||||
(function (view) {
|
||||
for (
|
||||
var containers = view.querySelectorAll(".autoScrollSection"),
|
||||
i = 0,
|
||||
length = containers.length;
|
||||
i < length;
|
||||
i++
|
||||
) {
|
||||
var section = containers[i],
|
||||
html = void 0,
|
||||
sectionType = section.getAttribute("data-section"),
|
||||
commands =
|
||||
"resume" === sectionType
|
||||
? ' data-commands="removefromresume"'
|
||||
: "";
|
||||
(html = enableScrollX(sectionType)
|
||||
? '<div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale padded-left padded-left-page padded-right" data-mousewheel="false" data-focusscroll="true"><div is="emby-itemscontainer"' +
|
||||
commands +
|
||||
' class="itemsContainer scrollSlider focuscontainer-x" data-monitor="videoplayback,markplayed" data-virtualscrolllayout="horizontal-grid"></div></div>'
|
||||
: '<div is="emby-itemscontainer"' +
|
||||
commands +
|
||||
' class="itemsContainer padded-left padded-left-page padded-right vertical-wrap focuscontainer-x" data-monitor="videoplayback,markplayed"></div>'),
|
||||
section.insertAdjacentHTML("beforeend", html);
|
||||
}
|
||||
})(view),
|
||||
(this.resumeItemsContainer = view.querySelector(
|
||||
".resumeSection .itemsContainer",
|
||||
)),
|
||||
(this.resumeItemsContainer.fetchData = function (query) {
|
||||
var apiClient = this.apiClient,
|
||||
parentId = this.params.parentId;
|
||||
return apiClient.getResumableItems(
|
||||
apiClient.getCurrentUserId(),
|
||||
Object.assign(
|
||||
{
|
||||
IncludeItemTypes: "Episode",
|
||||
Fields:
|
||||
this.getRequestedItemFields() + ",PrimaryImageAspectRatio",
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: this.getRequestedImageTypes(),
|
||||
},
|
||||
query,
|
||||
),
|
||||
);
|
||||
}.bind(this)),
|
||||
(this.resumeItemsContainer.getListOptions = function () {
|
||||
return {
|
||||
renderer: _cardbuilder.default,
|
||||
options: {
|
||||
preferThumb: !0,
|
||||
shape: "backdrop",
|
||||
scalable: !0,
|
||||
fields: this.enableFocusPreview() ? [] : ["ParentName", "Name"],
|
||||
centerText: !0,
|
||||
overlayPlayButton: !0,
|
||||
cardLayout: !1,
|
||||
focusTransformTitleAdjust: !0,
|
||||
animateProgressBar: !0,
|
||||
},
|
||||
virtualScrollLayout: "horizontal-grid",
|
||||
};
|
||||
}.bind(this)),
|
||||
(this.resumeItemsContainer.parentContainer =
|
||||
view.querySelector(".resumeSection")),
|
||||
this.addFocusBehavior(this.resumeItemsContainer),
|
||||
(this.latestItemsContainer = view.querySelector(
|
||||
".latestSection .itemsContainer",
|
||||
)),
|
||||
(this.latestItemsContainer.fetchData = function (query) {
|
||||
var parentId = this.params.parentId;
|
||||
return this.apiClient.getLatestItems(
|
||||
Object.assign({
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: 30,
|
||||
Fields: this.getRequestedItemFields() + ",PrimaryImageAspectRatio",
|
||||
ParentId: parentId,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: this.getRequestedImageTypes(),
|
||||
GroupItems: !1,
|
||||
}),
|
||||
query,
|
||||
);
|
||||
}.bind(this)),
|
||||
(this.latestItemsContainer.getListOptions = function () {
|
||||
return {
|
||||
renderer: _cardbuilder.default,
|
||||
options: {
|
||||
preferThumb: !0,
|
||||
shape: "backdrop",
|
||||
scalable: !0,
|
||||
fields: this.enableFocusPreview() ? [] : ["ParentName", "Name"],
|
||||
centerText: !0,
|
||||
overlayPlayButton: !0,
|
||||
cardLayout: !1,
|
||||
focusTransformTitleAdjust: !0,
|
||||
},
|
||||
virtualScrollLayout: enableScrollX("latest")
|
||||
? "horizontal-grid"
|
||||
: "vertical-grid",
|
||||
};
|
||||
}.bind(this)),
|
||||
(this.latestItemsContainer.parentContainer =
|
||||
view.querySelector(".latestSection")),
|
||||
this.addFocusBehavior(this.latestItemsContainer),
|
||||
params.parentId &&
|
||||
(this.resumeItemsContainer.setAttribute(
|
||||
"data-parentid",
|
||||
params.parentId,
|
||||
),
|
||||
this.latestItemsContainer.setAttribute(
|
||||
"data-parentid",
|
||||
params.parentId,
|
||||
));
|
||||
}
|
||||
Object.defineProperty(_exports, "__esModule", { value: !0 }),
|
||||
(_exports.default = void 0),
|
||||
Object.assign(TvSuggestionsTab.prototype, _basetab.default.prototype),
|
||||
(TvSuggestionsTab.prototype.supportsFocusPreview = function () {
|
||||
return !0;
|
||||
}),
|
||||
(TvSuggestionsTab.prototype.enableFocusPreview = function () {
|
||||
return _layoutmanager.default.tv && this.supportsFocusPreview();
|
||||
}),
|
||||
(TvSuggestionsTab.prototype.onResume = function (options) {
|
||||
_basetab.default.prototype.onResume.apply(this, arguments);
|
||||
var promises = [],
|
||||
instance =
|
||||
(promises.push(this.resumeItemsContainer.resume(options)),
|
||||
promises.push(this.latestItemsContainer.resume(options)),
|
||||
this);
|
||||
Promise.all(promises).then(function () {
|
||||
options.autoFocus && instance.autoFocus(),
|
||||
instance.fillFocusPreviewIfNeeded();
|
||||
});
|
||||
}),
|
||||
(TvSuggestionsTab.prototype.onPause = function () {
|
||||
_basetab.default.prototype.onPause.apply(this, arguments),
|
||||
this.resumeItemsContainer.pause(),
|
||||
this.latestItemsContainer.pause();
|
||||
}),
|
||||
(TvSuggestionsTab.prototype.destroy = function () {
|
||||
_basetab.default.prototype.destroy.apply(this, arguments),
|
||||
(this.view = null),
|
||||
(this.params = null),
|
||||
(this.apiClient = null),
|
||||
(this.resumeItemsContainer = null),
|
||||
(this.latestItemsContainer = null);
|
||||
}),
|
||||
(_exports.default = TvSuggestionsTab);
|
||||
});
|
||||
|
||||
132
tv/upcoming.js
132
tv/upcoming.js
@ -1 +1,131 @@
|
||||
define(["exports","./../modules/emby-apiclient/connectionmanager.js","./../modules/cardbuilder/cardbuilder.js","./../modules/tabbedview/basetab.js","./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/common/globalize.js","./../modules/common/datetime.js"],function(_exports,_connectionmanager,_cardbuilder,_basetab,_embyItemscontainer,_embyScroller,_globalize,_datetime){function UpcomingTab(view,params){_basetab.default.apply(this,arguments),this.view=view,this.params=params,this.apiClient=_connectionmanager.default.getApiClient(params.serverId)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(UpcomingTab.prototype,_basetab.default.prototype),UpcomingTab.prototype.onResume=function(options){_basetab.default.prototype.onResume.apply(this,arguments);var promises,parentId,view,instance,apiClient=this.apiClient;options.refresh&&(parentId=this.params.parentId,(promises=[]).push(apiClient.getUpcomingEpisodes({Limit:60,UserId:apiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1,parentId:parentId})),view=this.view,instance=this,Promise.all(promises).then(function(responses){return function(view,items){for(var groups=[],currentGroupName="",currentGroup=[],i=0,length=items.length;i<length;i++){var item=items[i],dateText="";if(item.PremiereDate)try{var premiereDate=new Date(Date.parse(item.PremiereDate)),dateText=_datetime.default.isRelativeDay(premiereDate,-1)?_globalize.default.translate("Yesterday"):_datetime.default.toLocaleDateString(premiereDate,{weekday:"long",month:"short",day:"numeric"})}catch(err){dateText=item.PremiereDate}dateText!==currentGroupName?(currentGroup.length&&groups.push({name:currentGroupName,items:currentGroup}),currentGroupName=dateText,currentGroup=[item]):currentGroup.push(item)}var html="";for(i=0,length=groups.length;i<length;i++)html=(html+='<div class="verticalSection verticalSection-cards focusable" data-focusabletype="nearest">')+'<h2 class="sectionTitle sectionTitle-cards padded-left padded-left-page">'+groups[i].name+'</h2><div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-framesize="matchgrandparent" data-focusscroll="true" data-mousewheel="false"><div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x padded-left padded-left-page padded-right"></div></div></div>';(view=view.classList.contains("upcomingContainer")?view:view.querySelector(".upcomingContainer")).innerHTML=html;var itemContainers=view.querySelectorAll(".itemsContainer");for(i=0,length=groups.length;i<length;i++)_cardbuilder.default.buildCards(groups[i].items,{showLocationTypeIndicator:!1,shape:"backdrop",preferThumb:!0,showDetailsMenu:!0,fields:["ParentName","Name"],missingIndicator:!1,multiSelect:!1,itemsContainer:itemContainers[i]})}(view,responses[0].Items),options.autoFocus&&instance.autoFocus(),Promise.resolve()}))},UpcomingTab.prototype.onPause=function(){_basetab.default.prototype.onPause.apply(this,arguments)},UpcomingTab.prototype.destroy=function(){_basetab.default.prototype.destroy.apply(this,arguments),this.view=null,this.params=null,this.apiClient=null},_exports.default=UpcomingTab});
|
||||
define([
|
||||
"exports",
|
||||
"./../modules/emby-apiclient/connectionmanager.js",
|
||||
"./../modules/cardbuilder/cardbuilder.js",
|
||||
"./../modules/tabbedview/basetab.js",
|
||||
"./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js",
|
||||
"./../modules/emby-elements/emby-scroller/emby-scroller.js",
|
||||
"./../modules/common/globalize.js",
|
||||
"./../modules/common/datetime.js",
|
||||
], function (
|
||||
_exports,
|
||||
_connectionmanager,
|
||||
_cardbuilder,
|
||||
_basetab,
|
||||
_embyItemscontainer,
|
||||
_embyScroller,
|
||||
_globalize,
|
||||
_datetime,
|
||||
) {
|
||||
function UpcomingTab(view, params) {
|
||||
_basetab.default.apply(this, arguments),
|
||||
(this.view = view),
|
||||
(this.params = params),
|
||||
(this.apiClient = _connectionmanager.default.getApiClient(
|
||||
params.serverId,
|
||||
));
|
||||
}
|
||||
Object.defineProperty(_exports, "__esModule", { value: !0 }),
|
||||
(_exports.default = void 0),
|
||||
Object.assign(UpcomingTab.prototype, _basetab.default.prototype),
|
||||
(UpcomingTab.prototype.onResume = function (options) {
|
||||
_basetab.default.prototype.onResume.apply(this, arguments);
|
||||
var promises,
|
||||
parentId,
|
||||
view,
|
||||
instance,
|
||||
apiClient = this.apiClient;
|
||||
options.refresh &&
|
||||
((parentId = this.params.parentId),
|
||||
(promises = []).push(
|
||||
apiClient.getUpcomingEpisodes({
|
||||
Limit: 60,
|
||||
UserId: apiClient.getCurrentUserId(),
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||
EnableTotalRecordCount: !1,
|
||||
parentId: parentId,
|
||||
}),
|
||||
),
|
||||
(view = this.view),
|
||||
(instance = this),
|
||||
Promise.all(promises).then(function (responses) {
|
||||
return (
|
||||
(function (view, items) {
|
||||
for (
|
||||
var groups = [],
|
||||
currentGroupName = "",
|
||||
currentGroup = [],
|
||||
i = 0,
|
||||
length = items.length;
|
||||
i < length;
|
||||
i++
|
||||
) {
|
||||
var item = items[i],
|
||||
dateText = "";
|
||||
if (item.PremiereDate)
|
||||
try {
|
||||
var premiereDate = new Date(Date.parse(item.PremiereDate)),
|
||||
dateText = _datetime.default.isRelativeDay(
|
||||
premiereDate,
|
||||
-1,
|
||||
)
|
||||
? _globalize.default.translate("Yesterday")
|
||||
: _datetime.default.toLocaleDateString(premiereDate, {
|
||||
weekday: "long",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
});
|
||||
} catch (err) {
|
||||
dateText = item.PremiereDate;
|
||||
}
|
||||
dateText !== currentGroupName
|
||||
? (currentGroup.length &&
|
||||
groups.push({
|
||||
name: currentGroupName,
|
||||
items: currentGroup,
|
||||
}),
|
||||
(currentGroupName = dateText),
|
||||
(currentGroup = [item]))
|
||||
: currentGroup.push(item);
|
||||
}
|
||||
var html = "";
|
||||
for (i = 0, length = groups.length; i < length; i++)
|
||||
html =
|
||||
(html +=
|
||||
'<div class="verticalSection verticalSection-cards focusable" data-focusabletype="nearest">') +
|
||||
'<h2 class="sectionTitle sectionTitle-cards padded-left padded-left-page">' +
|
||||
groups[i].name +
|
||||
'</h2><div is="emby-scroller" class="padded-top-focusscale padded-bottom-focusscale" data-framesize="matchgrandparent" data-focusscroll="true" data-mousewheel="false"><div is="emby-itemscontainer" class="itemsContainer scrollSlider focuscontainer-x padded-left padded-left-page padded-right"></div></div></div>';
|
||||
(view = view.classList.contains("upcomingContainer")
|
||||
? view
|
||||
: view.querySelector(".upcomingContainer")).innerHTML = html;
|
||||
var itemContainers = view.querySelectorAll(".itemsContainer");
|
||||
for (i = 0, length = groups.length; i < length; i++)
|
||||
_cardbuilder.default.buildCards(groups[i].items, {
|
||||
showLocationTypeIndicator: !1,
|
||||
shape: "backdrop",
|
||||
preferThumb: !0,
|
||||
showDetailsMenu: !0,
|
||||
fields: ["ParentName", "Name"],
|
||||
missingIndicator: !1,
|
||||
multiSelect: !1,
|
||||
itemsContainer: itemContainers[i],
|
||||
});
|
||||
})(view, responses[0].Items),
|
||||
options.autoFocus && instance.autoFocus(),
|
||||
Promise.resolve()
|
||||
);
|
||||
}));
|
||||
}),
|
||||
(UpcomingTab.prototype.onPause = function () {
|
||||
_basetab.default.prototype.onPause.apply(this, arguments);
|
||||
}),
|
||||
(UpcomingTab.prototype.destroy = function () {
|
||||
_basetab.default.prototype.destroy.apply(this, arguments),
|
||||
(this.view = null),
|
||||
(this.params = null),
|
||||
(this.apiClient = null);
|
||||
}),
|
||||
(_exports.default = UpcomingTab);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user