jellyfin-web/dashboard-ui/scripts/mysync.js
2017-07-15 17:23:28 -04:00

1 line
651 B
JavaScript

define(["apphost","globalize","syncJobList","events","localsync","emby-button","paper-icon-button-light"],function(appHost,globalize,syncJobList,events,localSync){"use strict";return function(view,params){var interval,mySyncJobList=new syncJobList({isLocalSync:"offline"===params.mode,enableRemoteSyncManagement:!1,serverId:ApiClient.serverId(),userId:"offline"===params.mode?null:ApiClient.getCurrentUserId(),element:view.querySelector(".syncActivity"),mode:params.mode});view.addEventListener("viewbeforehide",function(){interval&&(clearInterval(interval),interval=null)}),view.addEventListener("viewdestroy",function(){mySyncJobList.destroy()})}});