update themes

This commit is contained in:
Luke Pulverenti 2017-08-06 18:59:00 -04:00
parent 4dc718fff3
commit deb5eb03f8
13 changed files with 20 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["scroller","dom","layoutManager","inputManager","focusManager","registerElement"],function(scroller,dom,layoutManager,inputManager,focusManager){"use strict";function initCenterFocus(elem,scrollerInstance){dom.addEventListener(elem,"focus",function(e){var focused=focusManager.focusableParent(e.target);focused&&scrollerInstance.toCenter(focused)},{capture:!0,passive:!0})}function onInputCommand(e){var cmd=e.detail.command;"home"===cmd?(focusManager.focusFirst(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"end"===cmd?(focusManager.focusLast(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"pageup"===cmd?(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),-12),e.preventDefault(),e.stopPropagation()):"pagedown"===cmd&&(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),12),e.preventDefault(),e.stopPropagation())}function initHeadroom(elem){require(["headroom"],function(Headroom){var headroom=new Headroom([],{scroller:elem});headroom.init(),headroom.add(document.querySelector(".skinHeader")),elem.headroom=headroom})}function loadScrollButtons(scroller){require(["emby-scrollbuttons"],function(){scroller.insertAdjacentHTML("beforeend",'<div is="emby-scrollbuttons"></div>')})}var ScrollerProtoType=Object.create(HTMLDivElement.prototype);ScrollerProtoType.createdCallback=function(){this.classList.add("emby-scroller")},ScrollerProtoType.scrollToBeginning=function(){this.scroller&&this.scroller.slideTo(0,!0)},ScrollerProtoType.toStart=function(elem,immediate){this.scroller&&this.scroller.toStart(elem,immediate)},ScrollerProtoType.toCenter=function(elem,immediate){this.scroller&&this.scroller.toCenter(elem,immediate)},ScrollerProtoType.scrollToPosition=function(pos,immediate){this.scroller&&this.scroller.slideTo(pos,immediate)},ScrollerProtoType.getScrollPosition=function(){if(this.scroller)return this.scroller.getScrollPosition()},ScrollerProtoType.getScrollSize=function(){if(this.scroller)return this.scroller.getScrollSize()},ScrollerProtoType.getScrollEventName=function(){if(this.scroller)return this.scroller.getScrollEventName()},ScrollerProtoType.getScrollSlider=function(){if(this.scroller)return this.scroller.getScrollSlider()},ScrollerProtoType.addScrollEventListener=function(fn,options){this.scroller&&dom.addEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.removeScrollEventListener=function(fn,options){this.scroller&&dom.removeEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.attachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.on(this,onInputCommand);var horizontal="false"!==this.getAttribute("data-horizontal"),slider=this.querySelector(".scrollSlider");horizontal&&(slider.style["white-space"]="nowrap");var bindHeader="true"===this.getAttribute("data-bindheader"),scrollFrame=this.querySelector(".scrollerframe")||this,enableScrollButtons=layoutManager.desktop&&horizontal&&"false"!==this.getAttribute("data-scrollbuttons")&&scrollFrame!==this,options={horizontal:horizontal,mouseDragging:1,mouseWheel:"false"!==this.getAttribute("data-mousewheel"),touchDragging:1,slidee:slider,scrollBy:200,speed:horizontal?300:270,elasticBounds:1,dragHandle:1,scrollWidth:"auto"===this.getAttribute("data-scrollsize")?null:5e6,autoImmediate:!0,skipSlideToWhenVisible:"true"===this.getAttribute("data-skipfocuswhenvisible"),dispatchScrollEvent:enableScrollButtons||bindHeader||"true"===this.getAttribute("data-scrollevent"),hideScrollbar:enableScrollButtons};this.scroller=new scroller(scrollFrame,options),this.scroller.init(),layoutManager.tv&&this.getAttribute("data-centerfocus")&&initCenterFocus(this,this.scroller),bindHeader&&initHeadroom(this),enableScrollButtons&&loadScrollButtons(this)},ScrollerProtoType.detachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.off(this,onInputCommand);var headroom=this.headroom;headroom&&(headroom.destroy(),this.headroom=null);var scrollerInstance=this.scroller;scrollerInstance&&(scrollerInstance.destroy(),this.scroller=null)},document.registerElement("emby-scroller",{prototype:ScrollerProtoType,extends:"div"})}); define(["scroller","dom","layoutManager","inputManager","focusManager","registerElement"],function(scroller,dom,layoutManager,inputManager,focusManager){"use strict";function initCenterFocus(elem,scrollerInstance){dom.addEventListener(elem,"focus",function(e){var focused=focusManager.focusableParent(e.target);focused&&scrollerInstance.toCenter(focused)},{capture:!0,passive:!0})}function onInputCommand(e){var cmd=e.detail.command;"home"===cmd?(focusManager.focusFirst(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"end"===cmd?(focusManager.focusLast(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"pageup"===cmd?(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),-12),e.preventDefault(),e.stopPropagation()):"pagedown"===cmd&&(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),12),e.preventDefault(),e.stopPropagation())}function initHeadroom(elem){require(["headroom"],function(Headroom){var headroom=new Headroom([],{scroller:elem});headroom.init(),headroom.add(document.querySelector(".skinHeader")),elem.headroom=headroom})}function loadScrollButtons(scroller){require(["emby-scrollbuttons"],function(){scroller.insertAdjacentHTML("beforeend",'<div is="emby-scrollbuttons"></div>')})}var ScrollerProtoType=Object.create(HTMLDivElement.prototype);ScrollerProtoType.createdCallback=function(){this.classList.add("emby-scroller")},ScrollerProtoType.scrollToBeginning=function(){this.scroller&&this.scroller.slideTo(0,!0)},ScrollerProtoType.toStart=function(elem,immediate){this.scroller&&this.scroller.toStart(elem,immediate)},ScrollerProtoType.toCenter=function(elem,immediate){this.scroller&&this.scroller.toCenter(elem,immediate)},ScrollerProtoType.scrollToPosition=function(pos,immediate){this.scroller&&this.scroller.slideTo(pos,immediate)},ScrollerProtoType.getScrollPosition=function(){if(this.scroller)return this.scroller.getScrollPosition()},ScrollerProtoType.getScrollSize=function(){if(this.scroller)return this.scroller.getScrollSize()},ScrollerProtoType.getScrollEventName=function(){if(this.scroller)return this.scroller.getScrollEventName()},ScrollerProtoType.getScrollSlider=function(){if(this.scroller)return this.scroller.getScrollSlider()},ScrollerProtoType.addScrollEventListener=function(fn,options){this.scroller&&dom.addEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.removeScrollEventListener=function(fn,options){this.scroller&&dom.removeEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.attachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.on(this,onInputCommand);var horizontal="false"!==this.getAttribute("data-horizontal"),slider=this.querySelector(".scrollSlider");horizontal&&(slider.style["white-space"]="nowrap");var bindHeader="true"===this.getAttribute("data-bindheader"),scrollFrame=this.querySelector(".scrollerframe")||this,enableScrollButtons=layoutManager.desktop&&horizontal&&"false"!==this.getAttribute("data-scrollbuttons")&&scrollFrame!==this,options={horizontal:horizontal,mouseDragging:1,mouseWheel:"false"!==this.getAttribute("data-mousewheel"),touchDragging:1,slidee:slider,scrollBy:200,speed:horizontal?300:270,elasticBounds:1,dragHandle:1,scrollWidth:"auto"===this.getAttribute("data-scrollsize")?null:5e6,autoImmediate:!0,skipSlideToWhenVisible:"true"===this.getAttribute("data-skipfocuswhenvisible"),dispatchScrollEvent:enableScrollButtons||bindHeader||"true"===this.getAttribute("data-scrollevent"),hideScrollbar:enableScrollButtons,allowNativeSmoothScroll:"true"===this.getAttribute("data-allownativesmoothscroll")};this.scroller=new scroller(scrollFrame,options),this.scroller.init(),layoutManager.tv&&this.getAttribute("data-centerfocus")&&initCenterFocus(this,this.scroller),bindHeader&&initHeadroom(this),enableScrollButtons&&loadScrollButtons(this)},ScrollerProtoType.detachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.off(this,onInputCommand);var headroom=this.headroom;headroom&&(headroom.destroy(),this.headroom=null);var scrollerInstance=this.scroller;scrollerInstance&&(scrollerInstance.destroy(),this.scroller=null)},document.registerElement("emby-scroller",{prototype:ScrollerProtoType,extends:"div"})});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["userSettings","events","pluginManager","backdrop","globalize","require","appSettings"],function(userSettings,events,pluginManager,backdrop,globalize,require,appSettings){"use strict";function getCurrentSkin(){return currentSkin}function getRequirePromise(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}function loadSkin(id){var newSkin=pluginManager.plugins().filter(function(p){return p.id===id})[0];newSkin||(newSkin=pluginManager.plugins().filter(function(p){return"defaultskin"===p.id})[0]);var unloadPromise;if(currentSkin){if(currentSkin.id===newSkin.id)return Promise.resolve(currentSkin);unloadPromise=unloadSkin(currentSkin)}else unloadPromise=Promise.resolve();return unloadPromise.then(function(){var deps=newSkin.getDependencies();return console.log("Loading skin dependencies"),getRequirePromise(deps).then(function(){console.log("Skin dependencies loaded");var strings=newSkin.getTranslations?newSkin.getTranslations():[];return globalize.loadStrings({name:newSkin.id,strings:strings}).then(function(){return globalize.defaultModule(newSkin.id),loadSkinHeader(newSkin)})})})}function unloadSkin(skin){return unloadTheme(),backdrop.clear(),console.log("Unloading skin: "+skin.name),skin.unload().then(function(){document.dispatchEvent(new CustomEvent("skinunload",{detail:{name:skin.name}}))})}function loadSkinHeader(skin){return getSkinHeader(skin).then(function(headerHtml){return document.querySelector(".skinHeader").innerHTML=headerHtml,currentSkin=skin,skin.load(),skin})}function getSkinHeader(skin){return new Promise(function(resolve,reject){if(!skin.getHeaderTemplate)return void resolve("");var xhr=new XMLHttpRequest,url=skin.getHeaderTemplate();url+=url.indexOf("?")===-1?"?":"&",url+="v="+cacheParam,xhr.open("GET",url,!0),xhr.onload=function(e){resolve(this.status<400?this.response:"")},xhr.send()})}function loadUserSkin(){var skin=userSettings.get("skin",!1)||"defaultskin";loadSkin(skin).then(function(skin){Emby.Page.goHome()})}function unloadTheme(){var elem=themeStyleElement;elem&&(elem.parentNode.removeChild(elem),themeStyleElement=null,currentThemeId=null)}function getThemes(){return currentSkin.getThemes?currentSkin.getThemes():[]}function onRegistrationSuccess(){appSettings.set("appthemesregistered","true")}function onRegistrationFailure(){appSettings.set("appthemesregistered","false")}function isRegistered(){return getRequirePromise(["registrationServices"]).then(function(registrationServices){registrationServices.validateFeature("themes",{showDialog:!1}).then(onRegistrationSuccess,onRegistrationFailure)}),"false"!==appSettings.get("appthemesregistered")}function getThemeStylesheetInfo(id,isDefaultProperty){for(var defaultTheme,selectedTheme,themes=skinManager.getThemes(),i=0,length=themes.length;i<length;i++){var theme=themes[i];theme[isDefaultProperty]&&(defaultTheme=theme),id===theme.id&&(selectedTheme=theme)}selectedTheme=selectedTheme||defaultTheme,selectedTheme===defaultTheme.id||isRegistered()||(selectedTheme=defaultTheme);var embyWebComponentsBowerPath="bower_components/emby-webcomponents";return{stylesheetPath:require.toUrl(embyWebComponentsBowerPath+"/themes/"+selectedTheme.id+"/theme.css"),themeId:selectedTheme.id}}var currentSkin,cacheParam=(new Date).getTime();events.on(userSettings,"change",function(e,name){"skin"!==name&&"language"!==name||loadUserSkin()});var themeStyleElement,currentThemeId,skinManager={getCurrentSkin:getCurrentSkin,loadSkin:loadSkin,loadUserSkin:loadUserSkin,getThemes:getThemes};return skinManager.setTheme=function(id,context){return new Promise(function(resolve,reject){if(currentThemeId===id)return void resolve();var isDefaultProperty="serverdashboard"===context?"isDefaultServerDashboard":"isDefault",info=getThemeStylesheetInfo(id,isDefaultProperty);if(currentThemeId===info.themeId)return void resolve();var linkUrl=info.stylesheetPath;unloadTheme();var link=document.createElement("link");link.setAttribute("rel","stylesheet"),link.setAttribute("type","text/css"),link.onload=resolve,link.setAttribute("href",linkUrl),document.head.appendChild(link),themeStyleElement=link,currentThemeId=info.themeId})},skinManager}); define(["userSettings","events","pluginManager","backdrop","globalize","require","appSettings"],function(userSettings,events,pluginManager,backdrop,globalize,require,appSettings){"use strict";function getCurrentSkin(){return currentSkin}function getRequirePromise(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}function loadSkin(id){var newSkin=pluginManager.plugins().filter(function(p){return p.id===id})[0];newSkin||(newSkin=pluginManager.plugins().filter(function(p){return"defaultskin"===p.id})[0]);var unloadPromise;if(currentSkin){if(currentSkin.id===newSkin.id)return Promise.resolve(currentSkin);unloadPromise=unloadSkin(currentSkin)}else unloadPromise=Promise.resolve();return unloadPromise.then(function(){var deps=newSkin.getDependencies();return console.log("Loading skin dependencies"),getRequirePromise(deps).then(function(){console.log("Skin dependencies loaded");var strings=newSkin.getTranslations?newSkin.getTranslations():[];return globalize.loadStrings({name:newSkin.id,strings:strings}).then(function(){return globalize.defaultModule(newSkin.id),loadSkinHeader(newSkin)})})})}function unloadSkin(skin){return unloadTheme(),backdrop.clear(),console.log("Unloading skin: "+skin.name),skin.unload().then(function(){document.dispatchEvent(new CustomEvent("skinunload",{detail:{name:skin.name}}))})}function loadSkinHeader(skin){return getSkinHeader(skin).then(function(headerHtml){return document.querySelector(".skinHeader").innerHTML=headerHtml,currentSkin=skin,skin.load(),skin})}function getSkinHeader(skin){return new Promise(function(resolve,reject){if(!skin.getHeaderTemplate)return void resolve("");var xhr=new XMLHttpRequest,url=skin.getHeaderTemplate();url+=url.indexOf("?")===-1?"?":"&",url+="v="+cacheParam,xhr.open("GET",url,!0),xhr.onload=function(e){resolve(this.status<400?this.response:"")},xhr.send()})}function loadUserSkin(){var skin=userSettings.get("skin",!1)||"defaultskin";loadSkin(skin).then(function(skin){Emby.Page.goHome()})}function unloadTheme(){var elem=themeStyleElement;elem&&(elem.parentNode.removeChild(elem),themeStyleElement=null,currentThemeId=null)}function getThemes(){return currentSkin.getThemes?currentSkin.getThemes():[]}function onRegistrationSuccess(){appSettings.set("appthemesregistered","true")}function onRegistrationFailure(){appSettings.set("appthemesregistered","false")}function isRegistered(){return getRequirePromise(["registrationServices"]).then(function(registrationServices){registrationServices.validateFeature("themes",{showDialog:!1}).then(onRegistrationSuccess,onRegistrationFailure)}),"false"!==appSettings.get("appthemesregistered")}function getThemeStylesheetInfo(id,isDefaultProperty){for(var defaultTheme,selectedTheme,themes=skinManager.getThemes(),i=0,length=themes.length;i<length;i++){var theme=themes[i];theme[isDefaultProperty]&&(defaultTheme=theme),id===theme.id&&(selectedTheme=theme)}selectedTheme=selectedTheme||defaultTheme,selectedTheme===defaultTheme.id||isRegistered()||(selectedTheme=defaultTheme);var embyWebComponentsBowerPath="bower_components/emby-webcomponents";return{stylesheetPath:require.toUrl(embyWebComponentsBowerPath+"/themes/"+selectedTheme.id+"/theme.css"),themeId:selectedTheme.id}}var currentSkin,cacheParam=(new Date).getTime();events.on(userSettings,"change",function(e,name){"skin"!==name&&"language"!==name||loadUserSkin()});var themeStyleElement,currentThemeId,skinManager={getCurrentSkin:getCurrentSkin,loadSkin:loadSkin,loadUserSkin:loadUserSkin,getThemes:getThemes};return skinManager.setTheme=function(id,context){return new Promise(function(resolve,reject){if(currentThemeId&&currentThemeId===id)return void resolve();var isDefaultProperty="serverdashboard"===context?"isDefaultServerDashboard":"isDefault",info=getThemeStylesheetInfo(id,isDefaultProperty);if(currentThemeId&&currentThemeId===info.themeId)return void resolve();var linkUrl=info.stylesheetPath;unloadTheme();var link=document.createElement("link");link.setAttribute("rel","stylesheet"),link.setAttribute("type","text/css"),link.onload=resolve,link.setAttribute("href",linkUrl),document.head.appendChild(link),themeStyleElement=link,currentThemeId=info.themeId})},skinManager});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.osdPoster img,.pageContainer,.videoOsdBottom{bottom:0;left:0;right:0}.osdHeader{padding-bottom:3vh;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;position:relative;z-index:1;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-backdrop-filter:none!important;backdrop-filter:none!important;color:#eee}.osdHeader-hidden{opacity:0}.osdHeader .headerButton:not(.headerBackButton){display:none}.chapterThumbContainer{-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;position:relative}.chapterThumb{background-position:center center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;border:0;height:20vh;min-width:20vh}@media all and (orientation:portrait){.chapterThumb{height:30vw;min-width:30vw}}@media all and (max-height:50em) and (orientation:landscape){.chapterThumb{height:30vh;min-width:30vh}}.chapterThumbTextContainer{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.7);padding:.25em .5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chapterThumbText{padding:.25em 0;margin:0;opacity:1}.chapterThumbText-dim{opacity:.6}.videoOsdBottom{position:fixed;background-color:rgba(0,0,0,.7);padding:1%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;will-change:transform;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.8)));background:-webkit-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.8));background:-o-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.8));background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.8));color:#fff}.videoOsdBottom-hidden{opacity:0}.osdControls{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.videoOsdBottom .buttons{padding:.25em 0 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.osdVolumeSliderContainer{width:6.5em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.osdMediaInfo,.volumeButtons{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.volumeButtons{margin:0 .5em 0 auto;display:flex;-webkit-align-items:center;align-items:center}.osdTimeText{margin-left:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.osdPoster{width:10%;position:relative;margin-right:.5em}.osdPoster img{position:absolute;height:auto;width:100%;-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;border:1px solid #222;user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none}.osdTitle,.osdTitleSmall{margin:0 1em 0 0}.osdMediaInfo{display:flex;-webkit-align-items:center;align-items:center}.osdSecondaryMediaInfo{padding-left:.6em!important}.osdTextContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:.7em;padding-left:.5em}.osdMainTextContainer{-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline}.pageContainer{top:0;position:fixed}@media all and (max-width:30em){.btnFastForward,.btnRewind,.osdMediaInfo,.osdPoster{display:none!important}}@media all and (max-width:33.75em){.videoOsdBottom .paper-icon-button-light{margin:0}}@media all and (max-width:37.5em){.videoOsdBottom .volumeButtons{display:none!important}}@media all and (max-width:75em){.videoOsdBottom .endsAtText{display:none!important}} .osdPoster img,.pageContainer,.videoOsdBottom{bottom:0;left:0;right:0}.osdHeader{padding-bottom:3vh;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;position:relative;z-index:1;background-color:rgba(0,0,0,.3)!important;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)))!important;background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))!important;background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))!important;background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;color:#eee}.osdHeader-hidden{opacity:0}.osdHeader .headerButton:not(.headerBackButton){display:none}.chapterThumbContainer{-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;position:relative}.chapterThumb{background-position:center center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;border:0;height:20vh;min-width:20vh}@media all and (orientation:portrait){.chapterThumb{height:30vw;min-width:30vw}}@media all and (max-height:50em) and (orientation:landscape){.chapterThumb{height:30vh;min-width:30vh}}.chapterThumbTextContainer{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.7);padding:.25em .5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chapterThumbText{padding:.25em 0;margin:0;opacity:1}.chapterThumbText-dim{opacity:.6}.videoOsdBottom{position:fixed;background-color:rgba(0,0,0,.7);padding:1%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;will-change:transform;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.8)));background:-webkit-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.8));background:-o-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.8));background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.8));color:#fff}.videoOsdBottom-hidden{opacity:0}.osdControls{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.videoOsdBottom .buttons{padding:.25em 0 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.osdVolumeSliderContainer{width:6.5em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.osdMediaInfo,.volumeButtons{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.volumeButtons{margin:0 .5em 0 auto;display:flex;-webkit-align-items:center;align-items:center}.osdTimeText{margin-left:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.osdPoster{width:10%;position:relative;margin-right:.5em}.osdPoster img{position:absolute;height:auto;width:100%;-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;border:1px solid #222;user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none}.osdTitle,.osdTitleSmall{margin:0 1em 0 0}.osdMediaInfo{display:flex;-webkit-align-items:center;align-items:center}.osdSecondaryMediaInfo{padding-left:.6em!important}.osdTextContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:.7em;padding-left:.5em}.osdMainTextContainer{-webkit-box-align:baseline;-webkit-align-items:baseline;align-items:baseline}.pageContainer{top:0;position:fixed}@media all and (max-width:30em){.btnFastForward,.btnRewind,.osdMediaInfo,.osdPoster{display:none!important}}@media all and (max-width:33.75em){.videoOsdBottom .paper-icon-button-light{margin:0}}@media all and (max-width:37.5em){.videoOsdBottom .volumeButtons{display:none!important}}@media all and (max-width:75em){.videoOsdBottom .endsAtText{display:none!important}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["jQuery","loading","libraryMenu","fnchecked"],function($,loading,libraryMenu){"use strict";function loadUser(page,user){currentUser=user,user.Policy.IsDisabled?$(".disabledUserBanner",page).show():$(".disabledUserBanner",page).hide(),"Guest"==user.ConnectLinkType?($("#fldConnectInfo",page).hide(),$("#txtUserName",page).prop("disabled","disabled")):($("#txtUserName",page).prop("disabled","").removeAttr("disabled"),$("#fldConnectInfo",page).show()),$(".lnkEditUserPreferences",page).attr("href","mypreferencesmenu.html?userId="+user.Id),libraryMenu.setTitle(user.Name),$("#txtUserName",page).val(user.Name),$("#txtConnectUserName",page).val(currentUser.ConnectUserName),$("#chkIsAdmin",page).checked(user.Policy.IsAdministrator),$("#chkDisabled",page).checked(user.Policy.IsDisabled),$("#chkIsHidden",page).checked(user.Policy.IsHidden),$("#chkRemoteControlSharedDevices",page).checked(user.Policy.EnableSharedDeviceControl),$("#chkEnableRemoteControlOtherUsers",page).checked(user.Policy.EnableRemoteControlOfOtherUsers),$("#chkEnableDownloading",page).checked(user.Policy.EnableContentDownloading),$("#chkManageLiveTv",page).checked(user.Policy.EnableLiveTvManagement),$("#chkEnableLiveTvAccess",page).checked(user.Policy.EnableLiveTvAccess),$("#chkEnableContentDeletion",page).checked(user.Policy.EnableContentDeletion),$("#chkDisableUserPreferences",page).checked(!user.Policy.EnableUserPreferenceAccess),$("#chkEnableMediaPlayback",page).checked(user.Policy.EnableMediaPlayback),$("#chkEnableAudioPlaybackTranscoding",page).checked(user.Policy.EnableAudioPlaybackTranscoding),$("#chkEnableVideoPlaybackTranscoding",page).checked(user.Policy.EnableVideoPlaybackTranscoding),$("#chkEnableVideoPlaybackRemuxing",page).checked(user.Policy.EnablePlaybackRemuxing),$("#chkEnableSyncTranscoding",page).checked(user.Policy.EnableSyncTranscoding),$("#chkEnableSharing",page).checked(user.Policy.EnablePublicSharing),loading.hide()}function onSaveComplete(page,user){loading.hide();var currentConnectUsername=currentUser.ConnectUserName||"",enteredConnectUsername=$("#txtConnectUserName",page).val();currentConnectUsername==enteredConnectUsername?require(["toast"],function(toast){toast(Globalize.translate("SettingsSaved"))}):require(["connectHelper"],function(connectHelper){connectHelper.updateUserLink(ApiClient,user,$("#txtConnectUserName",page).val()).then(function(){loadData(page)})})}function saveUser(user,page){user.Name=$("#txtUserName",page).val(),user.Policy.IsAdministrator=$("#chkIsAdmin",page).checked(),user.Policy.IsHidden=$("#chkIsHidden",page).checked(),user.Policy.IsDisabled=$("#chkDisabled",page).checked(),user.Policy.EnableRemoteControlOfOtherUsers=$("#chkEnableRemoteControlOtherUsers",page).checked(),user.Policy.EnableLiveTvManagement=$("#chkManageLiveTv",page).checked(),user.Policy.EnableLiveTvAccess=$("#chkEnableLiveTvAccess",page).checked(),user.Policy.EnableContentDeletion=$("#chkEnableContentDeletion",page).checked(),user.Policy.EnableUserPreferenceAccess=!$("#chkDisableUserPreferences",page).checked(),user.Policy.EnableSharedDeviceControl=$("#chkRemoteControlSharedDevices",page).checked(),user.Policy.EnableMediaPlayback=$("#chkEnableMediaPlayback",page).checked(),user.Policy.EnableAudioPlaybackTranscoding=$("#chkEnableAudioPlaybackTranscoding",page).checked(),user.Policy.EnableVideoPlaybackTranscoding=$("#chkEnableVideoPlaybackTranscoding",page).checked(),user.Policy.EnablePlaybackRemuxing=$("#chkEnableVideoPlaybackRemuxing",page).checked(),user.Policy.EnableContentDownloading=$("#chkEnableDownloading",page).checked(),user.Policy.EnableSyncTranscoding=$("#chkEnableSyncTranscoding",page).checked(),user.Policy.EnablePublicSharing=$("#chkEnableSharing",page).checked(),ApiClient.updateUser(user).then(function(){ApiClient.updateUserPolicy(user.Id,user.Policy).then(function(){onSaveComplete(page,user)})})}function onSubmit(){var page=$(this).parents(".page");return loading.show(),getUser().then(function(result){saveUser(result,page)}),!1}function getUser(){var userId=getParameterByName("userId");return ApiClient.getUser(userId)}function loadData(page){loading.show(),getUser().then(function(user){loadUser(page,user)})}var currentUser;$(document).on("pageinit","#editUserPage",function(){$(".editUserProfileForm").off("submit",onSubmit).on("submit",onSubmit),this.querySelector(".sharingHelp").innerHTML=Globalize.translate("OptionAllowLinkSharingHelp",30)}).on("pagebeforeshow","#editUserPage",function(){var page=this;loadData(page)})}); define(["jQuery","loading","libraryMenu","fnchecked"],function($,loading,libraryMenu){"use strict";function loadUser(page,user){currentUser=user,user.Policy.IsDisabled?$(".disabledUserBanner",page).show():$(".disabledUserBanner",page).hide(),"Guest"==user.ConnectLinkType?($("#fldConnectInfo",page).hide(),$("#txtUserName",page).prop("disabled","disabled")):($("#txtUserName",page).prop("disabled","").removeAttr("disabled"),$("#fldConnectInfo",page).show()),$(".lnkEditUserPreferences",page).attr("href","mypreferencesmenu.html?userId="+user.Id),libraryMenu.setTitle(user.Name),$("#txtUserName",page).val(user.Name),$("#txtConnectUserName",page).val(currentUser.ConnectUserName),$("#chkIsAdmin",page).checked(user.Policy.IsAdministrator),$("#chkDisabled",page).checked(user.Policy.IsDisabled),$("#chkIsHidden",page).checked(user.Policy.IsHidden),$("#chkRemoteControlSharedDevices",page).checked(user.Policy.EnableSharedDeviceControl),$("#chkEnableRemoteControlOtherUsers",page).checked(user.Policy.EnableRemoteControlOfOtherUsers),$("#chkEnableDownloading",page).checked(user.Policy.EnableContentDownloading),$("#chkManageLiveTv",page).checked(user.Policy.EnableLiveTvManagement),$("#chkEnableLiveTvAccess",page).checked(user.Policy.EnableLiveTvAccess),$("#chkEnableContentDeletion",page).checked(user.Policy.EnableContentDeletion),$("#chkEnableMediaPlayback",page).checked(user.Policy.EnableMediaPlayback),$("#chkEnableAudioPlaybackTranscoding",page).checked(user.Policy.EnableAudioPlaybackTranscoding),$("#chkEnableVideoPlaybackTranscoding",page).checked(user.Policy.EnableVideoPlaybackTranscoding),$("#chkEnableVideoPlaybackRemuxing",page).checked(user.Policy.EnablePlaybackRemuxing),$("#chkEnableSyncTranscoding",page).checked(user.Policy.EnableSyncTranscoding),$("#chkEnableSharing",page).checked(user.Policy.EnablePublicSharing),$("#txtRemoteClientBitrateLimit",page).val(user.Policy.RemoteClientBitrateLimit/1e6||""),loading.hide()}function onSaveComplete(page,user){loading.hide();var currentConnectUsername=currentUser.ConnectUserName||"",enteredConnectUsername=$("#txtConnectUserName",page).val();currentConnectUsername==enteredConnectUsername?require(["toast"],function(toast){toast(Globalize.translate("SettingsSaved"))}):require(["connectHelper"],function(connectHelper){connectHelper.updateUserLink(ApiClient,user,$("#txtConnectUserName",page).val()).then(function(){loadData(page)})})}function saveUser(user,page){user.Name=$("#txtUserName",page).val(),user.Policy.IsAdministrator=$("#chkIsAdmin",page).checked(),user.Policy.IsHidden=$("#chkIsHidden",page).checked(),user.Policy.IsDisabled=$("#chkDisabled",page).checked(),user.Policy.EnableRemoteControlOfOtherUsers=$("#chkEnableRemoteControlOtherUsers",page).checked(),user.Policy.EnableLiveTvManagement=$("#chkManageLiveTv",page).checked(),user.Policy.EnableLiveTvAccess=$("#chkEnableLiveTvAccess",page).checked(),user.Policy.EnableContentDeletion=$("#chkEnableContentDeletion",page).checked(),user.Policy.EnableSharedDeviceControl=$("#chkRemoteControlSharedDevices",page).checked(),user.Policy.EnableMediaPlayback=$("#chkEnableMediaPlayback",page).checked(),user.Policy.EnableAudioPlaybackTranscoding=$("#chkEnableAudioPlaybackTranscoding",page).checked(),user.Policy.EnableVideoPlaybackTranscoding=$("#chkEnableVideoPlaybackTranscoding",page).checked(),user.Policy.EnablePlaybackRemuxing=$("#chkEnableVideoPlaybackRemuxing",page).checked(),user.Policy.EnableContentDownloading=$("#chkEnableDownloading",page).checked(),user.Policy.EnableSyncTranscoding=$("#chkEnableSyncTranscoding",page).checked(),user.Policy.EnablePublicSharing=$("#chkEnableSharing",page).checked(),user.Policy.RemoteClientBitrateLimit=parseInt(1e6*parseFloat($("#txtRemoteClientBitrateLimit",page).val()||"0")),ApiClient.updateUser(user).then(function(){ApiClient.updateUserPolicy(user.Id,user.Policy).then(function(){onSaveComplete(page,user)})})}function onSubmit(){var page=$(this).parents(".page");return loading.show(),getUser().then(function(result){saveUser(result,page)}),!1}function getUser(){var userId=getParameterByName("userId");return ApiClient.getUser(userId)}function loadData(page){loading.show(),getUser().then(function(user){loadUser(page,user)})}var currentUser;$(document).on("pageinit","#editUserPage",function(){$(".editUserProfileForm").off("submit",onSubmit).on("submit",onSubmit),this.querySelector(".sharingHelp").innerHTML=Globalize.translate("OptionAllowLinkSharingHelp",30)}).on("pagebeforeshow","#editUserPage",function(){var page=this;loadData(page)})});

View File

@ -1037,8 +1037,6 @@
"HeaderNewUsers": "New Users", "HeaderNewUsers": "New Users",
"ButtonSignUp": "Sign up", "ButtonSignUp": "Sign up",
"ButtonForgotPassword": "Forgot password", "ButtonForgotPassword": "Forgot password",
"OptionDisableUserPreferences": "Disable access to user preferences",
"OptionDisableUserPreferencesHelp": "If enabled, only administrators will be able to configure user profile images, passwords, and language preferences.",
"HeaderSelectServer": "Select Server", "HeaderSelectServer": "Select Server",
"MessageNoServersAvailableToConnect": "No servers are available to connect to. If you've been invited to share a server, make sure to accept it below or by clicking the link in the email.", "MessageNoServersAvailableToConnect": "No servers are available to connect to. If you've been invited to share a server, make sure to accept it below or by clicking the link in the email.",
"TitleNewUser": "New User", "TitleNewUser": "New User",
@ -1090,7 +1088,7 @@
"OptionAllowMediaPlaybackTranscodingHelp": "Users will receive friendly messages when content is unplayable based on policy.", "OptionAllowMediaPlaybackTranscodingHelp": "Users will receive friendly messages when content is unplayable based on policy.",
"TabStreaming": "Streaming", "TabStreaming": "Streaming",
"LabelRemoteClientBitrateLimit": "Internet streaming bitrate limit (Mbps):", "LabelRemoteClientBitrateLimit": "Internet streaming bitrate limit (Mbps):",
"LabelRemoteClientBitrateLimitHelp": "An optional streaming bitrate limit for all out of network devices. This is useful to prevent devices from requesting a higher bitrate than your internet connection can handle.", "LabelRemoteClientBitrateLimitHelp": "An optional per-stream bitrate limit for all out of network devices. This is useful to prevent devices from requesting a higher bitrate than your internet connection can handle. This may result in increased CPU load on your server in order to transcode videos on the fly to a lower bitrate.",
"LabelConversionCpuCoreLimit": "CPU core limit:", "LabelConversionCpuCoreLimit": "CPU core limit:",
"LabelConversionCpuCoreLimitHelp": "Limit the number of CPU cores that will be used during sync conversion.", "LabelConversionCpuCoreLimitHelp": "Limit the number of CPU cores that will be used during sync conversion.",
"OptionEnableFullSpeedConversion": "Enable full speed conversion", "OptionEnableFullSpeedConversion": "Enable full speed conversion",
@ -1714,6 +1712,8 @@
"SyncMedia": "Sync Media", "SyncMedia": "Sync Media",
"HeaderCancelSyncJob": "Cancel Sync", "HeaderCancelSyncJob": "Cancel Sync",
"LabelQuality": "Quality:", "LabelQuality": "Quality:",
"MovieLibraryHelp": "Review the {0}Emby movie naming guide{1}.",
"TvLibraryHelp": "Review the {0}Emby TV naming guide{1}.",
"BookLibraryHelp": "Audio and text books are supported", "BookLibraryHelp": "Audio and text books are supported",
"MessageGamePluginRequired": "Requires installation of the GameBrowser plugin", "MessageGamePluginRequired": "Requires installation of the GameBrowser plugin",
"MessageUnsetContentHelp": "Content will be displayed as plain folders. For best results use the metadata manager to set the content types of sub-folders.", "MessageUnsetContentHelp": "Content will be displayed as plain folders. For best results use the metadata manager to set the content types of sub-folders.",

View File

@ -86,6 +86,12 @@
</div> </div>
<div class="fieldDescription">${OptionAllowMediaPlaybackTranscodingHelp}</div> <div class="fieldDescription">${OptionAllowMediaPlaybackTranscodingHelp}</div>
</div> </div>
<br />
<br />
<div class="inputContainer">
<input is="emby-input" type="number" id="txtRemoteClientBitrateLimit" pattern="[0-9]*" min="0" step=".25" label="${LabelRemoteClientBitrateLimit}" />
<div class="fieldDescription">${LabelRemoteClientBitrateLimitHelp}</div>
</div>
<div> <div>
<br /> <br />
<h3 class="checkboxListLabel">${HeaderRemoteControl}</h3> <h3 class="checkboxListLabel">${HeaderRemoteControl}</h3>
@ -131,13 +137,6 @@
</label> </label>
<div class="fieldDescription checkboxFieldDescription">${OptionDisableUserHelp}</div> <div class="fieldDescription checkboxFieldDescription">${OptionDisableUserHelp}</div>
</div> </div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkDisableUserPreferences" />
<span>${OptionDisableUserPreferences}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${OptionDisableUserPreferencesHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription" id="fldIsHidden"> <div class="checkboxContainer checkboxContainer-withDescription" id="fldIsHidden">
<label> <label>
<input type="checkbox" is="emby-checkbox" id="chkIsHidden" /> <input type="checkbox" is="emby-checkbox" id="chkIsHidden" />