mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
improve video startup performance
This commit is contained in:
parent
6c644cb637
commit
ca4b418eea
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
define(["appStorage","browser"],function(appStorage,browser){"use strict";function getDeviceProfile(){return null}function getCapabilities(){var caps={PlayableMediaTypes:["Audio","Video"],SupportsPersistentIdentifier:!1,DeviceProfile:getDeviceProfile()};return caps}function generateDeviceId(){return new Promise(function(resolve,reject){require(["cryptojs-sha1"],function(){var keys=[];keys.push(navigator.userAgent),keys.push((new Date).getTime()),resolve(CryptoJS.SHA1(keys.join("|")).toString())})})}function getDeviceId(){var key="_deviceId2",deviceId=appStorage.getItem(key);return deviceId?Promise.resolve(deviceId):generateDeviceId().then(function(deviceId){return appStorage.setItem(key,deviceId),deviceId})}function getDeviceName(){var deviceName;return deviceName=browser.tizen?"Samsung Smart TV":browser.web0S?"LG Smart TV":browser.operaTv?"Opera TV":browser.xboxOne?"Xbox One":browser.ps4?"Sony PS4":browser.chrome?"Chrome":browser.edge?"Edge":browser.firefox?"Firefox":browser.msie?"Internet Explorer":"Web Browser",browser.version&&(deviceName+=" "+browser.version),browser.ipad?deviceName+=" Ipad":browser.iphone?deviceName+=" Iphone":browser.android&&(deviceName+=" Android"),deviceName}function supportsVoiceInput(){return!browser.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)}function supportsFullscreen(){if(browser.tv)return!1;var element=document.documentElement;return element.requestFullscreen||element.mozRequestFullScreen||element.webkitRequestFullscreen||element.msRequestFullscreen}function getSyncProfile(){return new Promise(function(resolve,reject){require(["browserdeviceprofile","appSettings"],function(profileBuilder,appSettings){var profile=profileBuilder();profile.MaxStaticMusicBitrate=appSettings.maxStaticMusicBitrate(),resolve(profile)})})}function supportsHtmlMediaAutoplay(){if(browser.edgeUwp||browser.tv||browser.ps4||browser.xboxOne)return!0;if(browser.mobile)return!1;var savedResult=appStorage.getItem(htmlMediaAutoplayAppStorageKey);return"true"===savedResult||"false"!==savedResult&&null}var htmlMediaAutoplayAppStorageKey="supportshtmlmediaautoplay0",supportedFeatures=function(){var features=["filedownload","sharing","externalpremium"];return browser.operaTv||browser.tizen||browser.web0s?features.push("exit"):features.push("exitmenu"),browser.operaTv||features.push("externallinks"),supportsVoiceInput()&&features.push("voiceinput"),supportsHtmlMediaAutoplay()&&(features.push("htmlaudioautoplay"),features.push("htmlvideoautoplay")),window.SyncRegistered,supportsFullscreen()&&features.push("fullscreenchange"),(browser.chrome||browser.edge&&!browser.slow)&&features.push("imageanalysis"),Dashboard.isConnectMode()&&features.push("multiserver"),(browser.tv||browser.xboxOne||browser.ps4||browser.mobile)&&features.push("physicalvolumecontrol"),browser.tv||browser.xboxOne||browser.ps4||features.push("remotecontrol"),features}();supportedFeatures.indexOf("htmlvideoautoplay")===-1&&supportsHtmlMediaAutoplay()!==!1&&require(["autoPlayDetect"],function(autoPlayDetect){autoPlayDetect.supportsHtmlMediaAutoplay().then(function(){appStorage.setItem(htmlMediaAutoplayAppStorageKey,"true"),supportedFeatures.push("htmlvideoautoplay"),supportedFeatures.push("htmlaudioautoplay")},function(){appStorage.setItem(htmlMediaAutoplayAppStorageKey,"false")})});var appInfo,version=window.dashboardVersion||"3.0";return{getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(state){alert("setWindowState is not supported and should not be called")},exit:function(){if(browser.tizen)try{tizen.application.getCurrentApplication().exit()}catch(err){console.log("error closing application: "+err)}else window.close()},supports:function(command){return supportedFeatures.indexOf(command.toLowerCase())!=-1},appInfo:function(){return appInfo?Promise.resolve(appInfo):getDeviceId().then(function(deviceId){return appInfo={deviceId:deviceId,deviceName:getDeviceName(),appName:"Emby Mobile",appVersion:version}})},capabilities:getCapabilities,preferVisualCards:browser.android||browser.chrome,moreIcon:browser.safari||browser.edge?"dots-horiz":"dots-vert",getSyncProfile:getSyncProfile}});
|
define(["appStorage","browser"],function(appStorage,browser){"use strict";function getDeviceProfile(){return null}function getCapabilities(){var caps={PlayableMediaTypes:["Audio","Video"],SupportsPersistentIdentifier:!1,DeviceProfile:getDeviceProfile()};return caps}function generateDeviceId(){return new Promise(function(resolve,reject){require(["cryptojs-sha1"],function(){var keys=[];keys.push(navigator.userAgent),keys.push((new Date).getTime()),resolve(CryptoJS.SHA1(keys.join("|")).toString())})})}function getDeviceId(){var key="_deviceId2",deviceId=appStorage.getItem(key);return deviceId?Promise.resolve(deviceId):generateDeviceId().then(function(deviceId){return appStorage.setItem(key,deviceId),deviceId})}function getDeviceName(){var deviceName;return deviceName=browser.tizen?"Samsung Smart TV":browser.web0S?"LG Smart TV":browser.operaTv?"Opera TV":browser.xboxOne?"Xbox One":browser.ps4?"Sony PS4":browser.chrome?"Chrome":browser.edge?"Edge":browser.firefox?"Firefox":browser.msie?"Internet Explorer":"Web Browser",browser.version&&(deviceName+=" "+browser.version),browser.ipad?deviceName+=" Ipad":browser.iphone?deviceName+=" Iphone":browser.android&&(deviceName+=" Android"),deviceName}function supportsVoiceInput(){return!browser.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)}function supportsFullscreen(){if(browser.tv)return!1;var element=document.documentElement;return element.requestFullscreen||element.mozRequestFullScreen||element.webkitRequestFullscreen||element.msRequestFullscreen}function getSyncProfile(){return new Promise(function(resolve,reject){require(["browserdeviceprofile","appSettings"],function(profileBuilder,appSettings){var profile=profileBuilder();profile.MaxStaticMusicBitrate=appSettings.maxStaticMusicBitrate(),resolve(profile)})})}function supportsHtmlMediaAutoplay(){if(browser.edgeUwp||browser.tv||browser.ps4||browser.xboxOne)return!0;if(browser.mobile)return!1;var savedResult=appStorage.getItem(htmlMediaAutoplayAppStorageKey);return"true"===savedResult||"false"!==savedResult&&null}var htmlMediaAutoplayAppStorageKey="supportshtmlmediaautoplay0",supportedFeatures=function(){var features=["sharing","externalpremium"];return browser.edgeUwp||browser.tv||browser.xboxOne||browser.ps4||features.push("filedownload"),browser.operaTv||browser.tizen||browser.web0s?features.push("exit"):features.push("exitmenu"),browser.operaTv||features.push("externallinks"),supportsVoiceInput()&&features.push("voiceinput"),supportsHtmlMediaAutoplay()&&(features.push("htmlaudioautoplay"),features.push("htmlvideoautoplay")),window.SyncRegistered,supportsFullscreen()&&features.push("fullscreenchange"),(browser.chrome||browser.edge&&!browser.slow)&&features.push("imageanalysis"),Dashboard.isConnectMode()&&features.push("multiserver"),(browser.tv||browser.xboxOne||browser.ps4||browser.mobile)&&features.push("physicalvolumecontrol"),browser.tv||browser.xboxOne||browser.ps4||features.push("remotecontrol"),features}();supportedFeatures.indexOf("htmlvideoautoplay")===-1&&supportsHtmlMediaAutoplay()!==!1&&require(["autoPlayDetect"],function(autoPlayDetect){autoPlayDetect.supportsHtmlMediaAutoplay().then(function(){appStorage.setItem(htmlMediaAutoplayAppStorageKey,"true"),supportedFeatures.push("htmlvideoautoplay"),supportedFeatures.push("htmlaudioautoplay")},function(){appStorage.setItem(htmlMediaAutoplayAppStorageKey,"false")})});var appInfo,version=window.dashboardVersion||"3.0";return{getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(state){alert("setWindowState is not supported and should not be called")},exit:function(){if(browser.tizen)try{tizen.application.getCurrentApplication().exit()}catch(err){console.log("error closing application: "+err)}else window.close()},supports:function(command){return supportedFeatures.indexOf(command.toLowerCase())!=-1},appInfo:function(){return appInfo?Promise.resolve(appInfo):getDeviceId().then(function(deviceId){return appInfo={deviceId:deviceId,deviceName:getDeviceName(),appName:"Emby Mobile",appVersion:version}})},capabilities:getCapabilities,preferVisualCards:browser.android||browser.chrome,moreIcon:browser.safari||browser.edge?"dots-horiz":"dots-vert",getSyncProfile:getSyncProfile}});
|
@ -1 +1 @@
|
|||||||
define(["jQuery","fnchecked"],function($){"use strict";function load(page,config){$("#txtUploadPath",page).val(config.CameraUploadPath||""),$("#chkSubfolder",page).checked(config.EnableCameraUploadSubfolders)}function loadData(page){Dashboard.showLoadingMsg(),ApiClient.getNamedConfiguration("devices").then(function(config){load(page,config),Dashboard.hideLoadingMsg()})}function save(page){ApiClient.getNamedConfiguration("devices").then(function(config){config.CameraUploadPath=$("#txtUploadPath",page).val(),config.EnableCameraUploadSubfolders=$("#chkSubfolder",page).checked(),ApiClient.updateNamedConfiguration("devices",config).then(Dashboard.processServerConfigurationUpdateResult)})}function onSubmit(){var form=this,page=$(form).parents(".page");return save(page),!1}function getTabs(){return[{href:"syncactivity.html",name:Globalize.translate("TabSyncJobs")},{href:"devicesupload.html",name:Globalize.translate("TabCameraUpload")},{href:"appservices.html?context=sync",name:Globalize.translate("TabServices")},{href:"syncsettings.html",name:Globalize.translate("TabSettings")}]}$(document).on("pageinit","#devicesUploadPage",function(){var page=this;$("#btnSelectUploadPath",page).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&$("#txtUploadPath",page).val(path),picker.close()},header:Globalize.translate("HeaderSelectUploadPath")})})}),$(".devicesUploadForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#devicesUploadPage",function(){LibraryMenu.setTabs("syncadmin",1,getTabs);var page=this;loadData(page)})});
|
define(["jQuery","fnchecked"],function($){"use strict";function load(page,config){$("#txtUploadPath",page).val(config.CameraUploadPath||""),$("#chkSubfolder",page).checked(config.EnableCameraUploadSubfolders)}function loadData(page){Dashboard.showLoadingMsg(),ApiClient.getNamedConfiguration("devices").then(function(config){load(page,config),Dashboard.hideLoadingMsg()})}function save(page){ApiClient.getNamedConfiguration("devices").then(function(config){config.CameraUploadPath=$("#txtUploadPath",page).val(),config.EnableCameraUploadSubfolders=$("#chkSubfolder",page).checked(),ApiClient.updateNamedConfiguration("devices",config).then(Dashboard.processServerConfigurationUpdateResult)})}function onSubmit(){var form=this,page=$(form).parents(".page");return save(page),!1}function getTabs(){return[{href:"devices.html",name:Globalize.translate("TabDevices")},{href:"devicesupload.html",name:Globalize.translate("TabCameraUpload")}]}$(document).on("pageinit","#devicesUploadPage",function(){var page=this;$("#btnSelectUploadPath",page).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&$("#txtUploadPath",page).val(path),picker.close()},header:Globalize.translate("HeaderSelectUploadPath")})})}),$(".devicesUploadForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#devicesUploadPage",function(){LibraryMenu.setTabs("devices",1,getTabs);var page=this;loadData(page)})});
|
@ -1,4 +1,4 @@
|
|||||||
<div id="devicePage" data-role="page" class="page type-interior devicesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Devices" data-require="scripts/device,emby-input,emby-button">
|
<div id="devicePage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Devices" data-require="scripts/device,emby-input,emby-button">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div id="devicesPage" data-role="page" class="page type-interior devicesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Devices" data-require="scripts/devices">
|
<div id="devicesPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Devices" data-require="scripts/devices">
|
||||||
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
@ -1 +1 @@
|
|||||||
define(["jQuery"],function($){"use strict";function load(page,device,capabilities){capabilities.SupportsContentUploading?$("#fldCameraUploadPath",page).removeClass("hide"):$("#fldCameraUploadPath",page).addClass("hide"),$("#txtCustomName",page).val(device.CustomName||""),$("#txtUploadPath",page).val(device.CameraUploadPath||""),$(".reportedName",page).html(device.ReportedName||"")}function loadData(page){Dashboard.showLoadingMsg();var id=getParameterByName("id"),promise1=ApiClient.getJSON(ApiClient.getUrl("Devices/Info",{Id:id})),promise2=ApiClient.getJSON(ApiClient.getUrl("Devices/Capabilities",{Id:id}));Promise.all([promise1,promise2]).then(function(responses){load(page,responses[0],responses[1]),Dashboard.hideLoadingMsg()})}function save(page){var id=getParameterByName("id");ApiClient.ajax({url:ApiClient.getUrl("Devices/Options",{Id:id}),type:"POST",data:JSON.stringify({CustomName:$("#txtCustomName",page).val(),CameraUploadPath:$("#txtUploadPath",page).val()}),contentType:"application/json"}).then(Dashboard.processServerConfigurationUpdateResult)}function onSubmit(){var form=this,page=$(form).parents(".page");return save(page),!1}$(document).on("pageinit","#devicePage",function(){var page=this;$("#btnSelectUploadPath",page).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&$("#txtUploadPath",page).val(path),picker.close()},header:Globalize.translate("HeaderSelectUploadPath")})})}),$(".deviceForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#devicePage",function(){var page=this;loadData(page)})});
|
define(["jQuery"],function($){"use strict";function load(page,device,capabilities){capabilities.SupportsContentUploading?$("#fldCameraUploadPath",page).removeClass("hide"):$("#fldCameraUploadPath",page).addClass("hide"),$("#txtCustomName",page).val(device.CustomName||""),$("#txtUploadPath",page).val(device.CameraUploadPath||""),$(".reportedName",page).html(device.ReportedName||"")}function loadData(page){Dashboard.showLoadingMsg();var id=getParameterByName("id"),promise1=ApiClient.getJSON(ApiClient.getUrl("Devices/Info",{Id:id})),promise2=ApiClient.getJSON(ApiClient.getUrl("Devices/Capabilities",{Id:id}));Promise.all([promise1,promise2]).then(function(responses){load(page,responses[0],responses[1]),Dashboard.hideLoadingMsg()})}function save(page){var id=getParameterByName("id");ApiClient.ajax({url:ApiClient.getUrl("Devices/Options",{Id:id}),type:"POST",data:JSON.stringify({CustomName:$("#txtCustomName",page).val(),CameraUploadPath:$("#txtUploadPath",page).val()}),contentType:"application/json"}).then(Dashboard.processServerConfigurationUpdateResult)}function onSubmit(){var form=this,page=$(form).parents(".page");return save(page),!1}function getTabs(){return[{href:"devices.html",name:Globalize.translate("TabDevices")},{href:"devicesupload.html",name:Globalize.translate("TabCameraUpload")}]}$(document).on("pageinit","#devicePage",function(){var page=this;$("#btnSelectUploadPath",page).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&$("#txtUploadPath",page).val(path),picker.close()},header:Globalize.translate("HeaderSelectUploadPath")})})}),$(".deviceForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#devicePage",function(){LibraryMenu.setTabs("devices",0,getTabs);var page=this;loadData(page)})});
|
@ -1 +1 @@
|
|||||||
define(["jQuery","listViewStyle"],function($){"use strict";function deleteDevice(page,id){var msg=Globalize.translate("DeleteDeviceConfirmation");require(["confirm"],function(confirm){confirm(msg,Globalize.translate("HeaderDeleteDevice")).then(function(){Dashboard.showLoadingMsg(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Devices",{Id:id})}).then(function(){loadData(page)})})})}function load(page,devices){var html="";devices.length&&(html+='<div class="paperList">'),html+=devices.map(function(d){var deviceHtml="";return deviceHtml+='<div class="listItem">',deviceHtml+='<i class="listItemIcon md-icon" style="background:#999;">tablet_android</i>',deviceHtml+=d.AppName&&d.LastUserName?'<div class="listItemBody three-line">':'<div class="listItemBody two-line">',deviceHtml+='<a class="clearLink" href="device.html?id='+d.Id+'">',deviceHtml+='<div class="listItemBodyText">',deviceHtml+=d.Name,deviceHtml+="</div>",d.AppName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=d.AppName,deviceHtml+="</div>"),d.LastUserName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=Globalize.translate("DeviceLastUsedByUserName",d.LastUserName),deviceHtml+="</div>"),deviceHtml+="</a>",deviceHtml+="</div>",deviceHtml+='<button type="button" is="paper-icon-button-light" class="btnDeleteDevice" data-id="'+d.Id+'" title="'+Globalize.translate("ButtonDelete")+'"><i class="md-icon">delete</i></button>',deviceHtml+="</div>"}).join(""),devices.length&&(html+="</div>");var elem=$(".devicesList",page).html(html).trigger("create");$(".btnDeleteDevice",elem).on("click",function(){deleteDevice(page,this.getAttribute("data-id"))})}function loadData(page){Dashboard.showLoadingMsg(),ApiClient.getJSON(ApiClient.getUrl("Devices",{SupportsPersistentIdentifier:!0})).then(function(result){load(page,result.Items),Dashboard.hideLoadingMsg()})}$(document).on("pageshow","#devicesPage",function(){var page=this;loadData(page)})});
|
define(["jQuery","listViewStyle"],function($){"use strict";function deleteDevice(page,id){var msg=Globalize.translate("DeleteDeviceConfirmation");require(["confirm"],function(confirm){confirm(msg,Globalize.translate("HeaderDeleteDevice")).then(function(){Dashboard.showLoadingMsg(),ApiClient.ajax({type:"DELETE",url:ApiClient.getUrl("Devices",{Id:id})}).then(function(){loadData(page)})})})}function load(page,devices){var html="";devices.length&&(html+='<div class="paperList">'),html+=devices.map(function(d){var deviceHtml="";return deviceHtml+='<div class="listItem">',deviceHtml+='<i class="listItemIcon md-icon" style="background:#999;">tablet_android</i>',deviceHtml+=d.AppName&&d.LastUserName?'<div class="listItemBody three-line">':'<div class="listItemBody two-line">',deviceHtml+='<a class="clearLink" href="device.html?id='+d.Id+'">',deviceHtml+='<div class="listItemBodyText">',deviceHtml+=d.Name,deviceHtml+="</div>",d.AppName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=d.AppName,deviceHtml+="</div>"),d.LastUserName&&(deviceHtml+='<div class="listItemBodyText secondary">',deviceHtml+=Globalize.translate("DeviceLastUsedByUserName",d.LastUserName),deviceHtml+="</div>"),deviceHtml+="</a>",deviceHtml+="</div>",deviceHtml+='<button type="button" is="paper-icon-button-light" class="btnDeleteDevice" data-id="'+d.Id+'" title="'+Globalize.translate("ButtonDelete")+'"><i class="md-icon">delete</i></button>',deviceHtml+="</div>"}).join(""),devices.length&&(html+="</div>");var elem=$(".devicesList",page).html(html).trigger("create");$(".btnDeleteDevice",elem).on("click",function(){deleteDevice(page,this.getAttribute("data-id"))})}function loadData(page){Dashboard.showLoadingMsg(),ApiClient.getJSON(ApiClient.getUrl("Devices",{SupportsPersistentIdentifier:!0})).then(function(result){load(page,result.Items),Dashboard.hideLoadingMsg()})}function getTabs(){return[{href:"devices.html",name:Globalize.translate("TabDevices")},{href:"devicesupload.html",name:Globalize.translate("TabCameraUpload")}]}$(document).on("pageshow","#devicesPage",function(){LibraryMenu.setTabs("devices",0,getTabs);var page=this;loadData(page)})});
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
define(["loading","apphost","globalize","syncJobList","events","scripts/taskbutton","localsync","emby-button","paper-icon-button-light"],function(loading,appHost,globalize,syncJobList,events,taskButton){"use strict";function getTabs(){return[{href:"syncactivity.html",name:Globalize.translate("TabSyncJobs")},{href:"devicesupload.html",name:Globalize.translate("TabCameraUpload")},{href:"appservices.html?context=sync",name:Globalize.translate("TabServices")},{href:"syncsettings.html",name:Globalize.translate("TabSettings")}]}return function(view,params){var mySyncJobList=new syncJobList({isLocalSync:"offline"===params.mode,serverId:ApiClient.serverId(),userId:"offline"===params.mode?null:ApiClient.getCurrentUserId(),element:view.querySelector(".syncActivity"),mode:params.mode});view.addEventListener("viewshow",function(){LibraryMenu.setTabs("syncadmin",0,getTabs),taskButton({mode:"on",progressElem:view.querySelector(".syncProgress"),taskKey:"SyncPrepare",button:view.querySelector(".btnSync")})}),view.addEventListener("viewbeforehide",function(){taskButton({mode:"off",taskKey:"SyncPrepare",button:view.querySelector(".btnSync")})}),view.addEventListener("viewdestroy",function(){mySyncJobList.destroy()})}});
|
define(["loading","apphost","globalize","syncJobList","events","scripts/taskbutton","localsync","emby-button","paper-icon-button-light"],function(loading,appHost,globalize,syncJobList,events,taskButton){"use strict";function getTabs(){return[{href:"syncactivity.html",name:Globalize.translate("TabSyncJobs")},{href:"appservices.html?context=sync",name:Globalize.translate("TabServices")},{href:"syncsettings.html",name:Globalize.translate("TabSettings")}]}return function(view,params){var mySyncJobList=new syncJobList({isLocalSync:"offline"===params.mode,serverId:ApiClient.serverId(),userId:"offline"===params.mode?null:ApiClient.getCurrentUserId(),element:view.querySelector(".syncActivity"),mode:params.mode});view.addEventListener("viewshow",function(){LibraryMenu.setTabs("syncadmin",0,getTabs),taskButton({mode:"on",progressElem:view.querySelector(".syncProgress"),taskKey:"SyncPrepare",button:view.querySelector(".btnSync")})}),view.addEventListener("viewbeforehide",function(){taskButton({mode:"off",taskKey:"SyncPrepare",button:view.querySelector(".btnSync")})}),view.addEventListener("viewdestroy",function(){mySyncJobList.destroy()})}});
|
@ -1 +1 @@
|
|||||||
define(["jQuery","fnchecked"],function($){"use strict";function loadPage(page,config){$("#txtSyncTempPath",page).val(config.TemporaryPath||""),$("#txtUploadSpeedLimit",page).val(config.UploadSpeedLimitBytes/1e6||""),$("#txtCpuCoreLimit",page).val(config.TranscodingCpuCoreLimit),$("#chkEnableFullSpeedConversion",page).checked(config.EnableFullSpeedTranscoding),Dashboard.hideLoadingMsg()}function onSubmit(){Dashboard.showLoadingMsg();var form=this;return ApiClient.getNamedConfiguration("sync").then(function(config){config.TemporaryPath=$("#txtSyncTempPath",form).val(),config.UploadSpeedLimitBytes=parseInt(1e6*parseFloat($("#txtUploadSpeedLimit",form).val()||"0")),config.TranscodingCpuCoreLimit=parseInt($("#txtCpuCoreLimit",form).val()),config.EnableFullSpeedTranscoding=$("#chkEnableFullSpeedConversion",form).checked(),ApiClient.updateNamedConfiguration("sync",config).then(Dashboard.processServerConfigurationUpdateResult)}),!1}function getTabs(){return[{href:"syncactivity.html",name:Globalize.translate("TabSyncJobs")},{href:"devicesupload.html",name:Globalize.translate("TabCameraUpload")},{href:"appservices.html?context=sync",name:Globalize.translate("TabServices")},{href:"syncsettings.html",name:Globalize.translate("TabSettings")}]}$(document).on("pageinit","#syncSettingsPage",function(){var page=this;$("#btnSelectSyncTempPath",page).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&$("#txtSyncTempPath",page).val(path),picker.close()}})})}),$(".syncSettingsForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#syncSettingsPage",function(){Dashboard.showLoadingMsg(),LibraryMenu.setTabs("syncadmin",3,getTabs);var page=this;ApiClient.getNamedConfiguration("sync").then(function(config){loadPage(page,config)})})});
|
define(["jQuery","fnchecked"],function($){"use strict";function loadPage(page,config){$("#txtSyncTempPath",page).val(config.TemporaryPath||""),$("#txtUploadSpeedLimit",page).val(config.UploadSpeedLimitBytes/1e6||""),$("#txtCpuCoreLimit",page).val(config.TranscodingCpuCoreLimit),$("#chkEnableFullSpeedConversion",page).checked(config.EnableFullSpeedTranscoding),Dashboard.hideLoadingMsg()}function onSubmit(){Dashboard.showLoadingMsg();var form=this;return ApiClient.getNamedConfiguration("sync").then(function(config){config.TemporaryPath=$("#txtSyncTempPath",form).val(),config.UploadSpeedLimitBytes=parseInt(1e6*parseFloat($("#txtUploadSpeedLimit",form).val()||"0")),config.TranscodingCpuCoreLimit=parseInt($("#txtCpuCoreLimit",form).val()),config.EnableFullSpeedTranscoding=$("#chkEnableFullSpeedConversion",form).checked(),ApiClient.updateNamedConfiguration("sync",config).then(Dashboard.processServerConfigurationUpdateResult)}),!1}function getTabs(){return[{href:"syncactivity.html",name:Globalize.translate("TabSyncJobs")},{href:"appservices.html?context=sync",name:Globalize.translate("TabServices")},{href:"syncsettings.html",name:Globalize.translate("TabSettings")}]}$(document).on("pageinit","#syncSettingsPage",function(){var page=this;$("#btnSelectSyncTempPath",page).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({callback:function(path){path&&$("#txtSyncTempPath",page).val(path),picker.close()}})})}),$(".syncSettingsForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#syncSettingsPage",function(){Dashboard.showLoadingMsg(),LibraryMenu.setTabs("syncadmin",2,getTabs);var page=this;ApiClient.getNamedConfiguration("sync").then(function(config){loadPage(page,config)})})});
|
Loading…
Reference in New Issue
Block a user