mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
update user deletion
This commit is contained in:
parent
eded602a0c
commit
977f880713
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
define(["localassetmanager","cameraRoll"],function(localAssetManager,cameraRoll){"use strict";function getFilesToUpload(files,uploadHistory){return files.filter(function(file){return!!file&&0===uploadHistory.FilesUploaded.filter(function(u){return getUploadId(file)===u.Id}).length})}function getUploadId(file){return CryptoJS.SHA1(file+"1").toString()}function uploadNext(files,index,apiClient,resolve,reject){var length=files.length;return index>=length?void resolve():void uploadFile(files[index],apiClient).then(function(){uploadNext(files,index+1,apiClient,resolve,reject)},function(){uploadNext(files,index+1,apiClient,resolve,reject)})}function uploadFile(file,apiClient){return new Promise(function(resolve,reject){require(["fileupload","cryptojs-sha1"],function(FileUpload){var name="camera image "+(new Date).getTime(),url=apiClient.getUrl("Devices/CameraUploads",{DeviceId:apiClient.deviceId(),Name:name,Album:"Camera Roll",Id:getUploadId(file),api_key:apiClient.accessToken()});console.log("Uploading file to "+url),(new FileUpload).upload(file,name,url).then(resolve,reject)})})}function ContentUploader(){}return ContentUploader.prototype.uploadImages=function(connectionManager,apiClient){return cameraRoll.getFiles().then(function(photos){return photos.length?apiClient.getContentUploadHistory().then(function(uploadHistory){return photos=getFilesToUpload(photos,uploadHistory),console.log("Found "+photos.length+" files to upload"),new Promise(function(resolve,reject){uploadNext(photos,0,apiClient,resolve,reject)})},function(){return Promise.resolve()}):Promise.resolve()})},ContentUploader});
|
||||
define(["localassetmanager","cameraRoll"],function(localAssetManager,cameraRoll){"use strict";function getFilesToUpload(files,uploadHistory){return files.filter(function(file){return!!file&&0===uploadHistory.FilesUploaded.filter(function(u){return getUploadId(file)===u.Id}).length})}function getUploadId(file){return CryptoJS.SHA1(file+"1").toString()}function uploadNext(files,index,server,apiClient,resolve,reject){var length=files.length;return index>=length?void resolve():void uploadFile(files[index],apiClient).then(function(){uploadNext(files,index+1,server,apiClient,resolve,reject)},function(){uploadNext(files,index+1,server,apiClient,resolve,reject)})}function uploadFile(file,apiClient){return new Promise(function(resolve,reject){require(["fileupload","cryptojs-sha1"],function(FileUpload){var name="camera image "+(new Date).getTime(),url=apiClient.getUrl("Devices/CameraUploads",{DeviceId:apiClient.deviceId(),Name:name,Album:"Camera Roll",Id:getUploadId(file),api_key:apiClient.accessToken()});console.log("Uploading file to "+url),(new FileUpload).upload(file,name,url).then(resolve,reject)})})}function ContentUploader(){}return ContentUploader.prototype.uploadImages=function(connectionManager,server){return cameraRoll.getFiles().then(function(photos){if(!photos.length)return Promise.resolve();var apiClient=connectionManager.getApiClient(server.Id);return apiClient.getContentUploadHistory().then(function(uploadHistory){return photos=getFilesToUpload(photos,uploadHistory),console.log("Found "+photos.length+" files to upload"),new Promise(function(resolve,reject){uploadNext(photos,0,server,apiClient,resolve,reject)})},function(){return Promise.resolve()})})},ContentUploader});
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
define(["serversync"],function(ServerSync){"use strict";function syncNext(connectionManager,apiClients,index,options,resolve,reject){var length=apiClients.length;if(index>=length)return void resolve();var apiClient=apiClients[index];console.log("Creating ServerSync to server: "+apiClient.serverId()),(new ServerSync).sync(connectionManager,apiClient,options).then(function(){syncNext(connectionManager,apiClients,index+1,options,resolve,reject)},function(){syncNext(connectionManager,apiClients,index+1,options,resolve,reject)})}function MultiServerSync(){}return MultiServerSync.prototype.sync=function(connectionManager,options){return new Promise(function(resolve,reject){var apiClients=connectionManager.getApiClients();syncNext(connectionManager,apiClients,0,options,resolve,reject)})},MultiServerSync});
|
||||
define(["serversync"],function(ServerSync){"use strict";function syncNext(connectionManager,servers,index,options,resolve,reject){var length=servers.length;if(index>=length)return void resolve();var server=servers[index];console.log("Creating ServerSync to server: "+server.Id),(new ServerSync).sync(connectionManager,server,options).then(function(){syncNext(connectionManager,servers,index+1,options,resolve,reject)},function(){syncNext(connectionManager,servers,index+1,options,resolve,reject)})}function MultiServerSync(){}return MultiServerSync.prototype.sync=function(connectionManager,options){return new Promise(function(resolve,reject){var servers=connectionManager.getSavedServers();syncNext(connectionManager,servers,0,options,resolve,reject)})},MultiServerSync});
|
@ -1 +1 @@
|
||||
define([],function(){"use strict";function performSync(connectionManager,apiClient,options){var serverId=apiClient.serverId();console.log("ServerSync.performSync to server: "+serverId),options=options||{};var uploadPhotos=options.uploadPhotos!==!1;options.cameraUploadServers&&options.cameraUploadServers.indexOf(serverId)===-1&&(uploadPhotos=!1);var pr=Promise.resolve();return pr.then(function(){return uploadPhotos?uploadContent(connectionManager,apiClient,options):Promise.resolve()}).then(function(){return syncMedia(connectionManager,apiClient,options)})}function uploadContent(connectionManager,apiClient,options){return new Promise(function(resolve,reject){require(["contentuploader"],function(ContentUploader){var uploader=new ContentUploader;uploader.uploadImages(connectionManager,apiClient).then(resolve,reject)})})}function syncMedia(connectionManager,apiClient,options){return new Promise(function(resolve,reject){require(["mediasync"],function(MediaSync){(new MediaSync).sync(apiClient,options).then(resolve,reject)})})}function ServerSync(){}return ServerSync.prototype.sync=function(connectionManager,apiClient,options){var serverId=apiClient.serverId();return apiClient.accessToken()?performSync(connectionManager,apiClient,options):(console.log("Skipping sync to server "+serverId+" because there is no saved authentication information."),Promise.resolve())},ServerSync});
|
||||
define([],function(){"use strict";function performSync(connectionManager,server,options){console.log("ServerSync.performSync to server: "+server.Id),options=options||{};var uploadPhotos=options.uploadPhotos!==!1;options.cameraUploadServers&&options.cameraUploadServers.indexOf(server.Id)===-1&&(uploadPhotos=!1);var pr=Promise.resolve();return pr.then(function(){return uploadPhotos?uploadContent(connectionManager,server,options):Promise.resolve()}).then(function(){return syncMedia(connectionManager,server,options)})}function uploadContent(connectionManager,server,options){return new Promise(function(resolve,reject){require(["contentuploader"],function(ContentUploader){var uploader=new ContentUploader;uploader.uploadImages(connectionManager,server).then(resolve,reject)})})}function syncMedia(connectionManager,server,options){return new Promise(function(resolve,reject){require(["mediasync"],function(MediaSync){var apiClient=connectionManager.getApiClient(server.Id);(new MediaSync).sync(apiClient,server,options).then(resolve,reject)})})}function ServerSync(){}return ServerSync.prototype.sync=function(connectionManager,server,options){if(!server.AccessToken&&!server.ExchangeToken)return console.log("Skipping sync to server "+server.Id+" because there is no saved authentication information."),Promise.resolve();var connectionOptions={updateDateLastAccessed:!1,enableWebSocket:!1,reportCapabilities:!1,enableAutomaticBitrateDetection:!1};return connectionManager.connectToServer(server,connectionOptions).then(function(result){return result.State===MediaBrowser.ConnectionState.SignedIn?performSync(connectionManager,server,options):(console.log("Unable to connect to server id: "+server.Id),Promise.reject())},function(err){throw console.log("Unable to connect to server id: "+server.Id),err})},ServerSync});
|
@ -1 +1 @@
|
||||
.emby-select,.selectLabel{display:block}.emby-select{margin:0;margin-bottom:0!important;border-style:solid;border-width:0 0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:110%;font-family:inherit;font-weight:inherit;padding:.35em .8em .3em 0;cursor:pointer;outline:0!important;-webkit-tap-highlight-color:transparent;width:100%}.emby-select::-moz-focus-inner{border:0}.emby-select-withoptioncolor{color:inherit;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.emby-select-withoptioncolor>option{color:initial}.selectContainer{margin-bottom:1.8em;position:relative}.selectArrowContainer{position:absolute;right:0;top:.25em;color:inherit}.selectArrow{margin-top:.35em}.emby-select-selectionbar{height:2px;-webkit-transform:scale(0,1);transform:scale(0,1);-webkit-transition:-webkit-transform .25s ease-out;-o-transition:transform .25s ease-out;transition:transform .25s ease-out;position:relative;top:-1px;margin-bottom:.5em;-webkit-transform-origin:center center;transform-origin:center center}.emby-select:focus+.emby-select-selectionbar{-webkit-transform:none;transform:none}
|
||||
.emby-select,.selectLabel{display:block}.emby-select{margin:0;margin-bottom:0!important;border-style:solid;border-width:0 0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:110%;font-family:inherit;font-weight:inherit;padding:.35em .25em .3em 0;cursor:pointer;outline:0!important;-webkit-tap-highlight-color:transparent;width:100%}.emby-select::-moz-focus-inner{border:0}.emby-select-withoptioncolor{color:inherit;background:0 0}.emby-select-withoptioncolor>option{color:initial}.selectContainer{margin-bottom:1.8em;position:relative}.emby-select-selectionbar{height:2px;-webkit-transform:scale(0,1);transform:scale(0,1);-webkit-transition:-webkit-transform .25s ease-out;-o-transition:transform .25s ease-out;transition:transform .25s ease-out;position:relative;top:-1px;margin-bottom:.5em;-webkit-transform-origin:center center;transform-origin:center center}.emby-select:focus+.emby-select-selectionbar{-webkit-transform:none;transform:none}
|
@ -1 +1 @@
|
||||
define(["layoutManager","browser","actionsheet","css!./emby-select","registerElement"],function(layoutManager,browser,actionsheet){"use strict";function enableNativeMenu(){return!(!browser.edgeUwp&&!browser.xboxOne)||!browser.tizen&&!browser.orsay&&(!!browser.tv||!layoutManager.tv)}function triggerChange(select){var evt=document.createEvent("HTMLEvents");evt.initEvent("change",!1,!0),select.dispatchEvent(evt)}function setValue(select,value){select.value=value}function showActionSheet(select){var labelElem=getLabel(select),title=labelElem?labelElem.textContent||labelElem.innerText:null;actionsheet.show({items:select.options,positionTo:select,title:title}).then(function(value){setValue(select,value),triggerChange(select)})}function getLabel(select){for(var elem=select.previousSibling;elem&&"LABEL"!==elem.tagName;)elem=elem.previousSibling;return elem}function onFocus(e){var label=getLabel(this);label&&(label.classList.add("selectLabelFocused"),label.classList.remove("selectLabelUnfocused"))}function onBlur(e){var label=getLabel(this);label&&(label.classList.add("selectLabelUnfocused"),label.classList.remove("selectLabelFocused"))}function onMouseDown(e){e.button||enableNativeMenu()||(e.preventDefault(),showActionSheet(this))}function onKeyDown(e){switch(e.keyCode){case 13:return void(enableNativeMenu()||(e.preventDefault(),showActionSheet(this)));case 37:case 38:case 39:case 40:return void(layoutManager.tv&&e.preventDefault())}}var EmbySelectPrototype=Object.create(HTMLSelectElement.prototype),inputId=0;EmbySelectPrototype.createdCallback=function(){this.id||(this.id="embyselect"+inputId,inputId++),browser.firefox||this.classList.add("emby-select-withoptioncolor"),this.addEventListener("mousedown",onMouseDown),this.addEventListener("keydown",onKeyDown),this.addEventListener("focus",onFocus),this.addEventListener("blur",onBlur)},EmbySelectPrototype.attachedCallback=function(){if(!this.classList.contains("emby-select")){this.classList.add("emby-select");var label=this.ownerDocument.createElement("label");label.innerHTML=this.getAttribute("label")||"",label.classList.add("selectLabel"),label.classList.add("selectLabelUnfocused"),label.htmlFor=this.id,this.parentNode.insertBefore(label,this);var div=document.createElement("div");div.classList.add("emby-select-selectionbar"),this.parentNode.insertBefore(div,this.nextSibling);var arrowContainer=document.createElement("div");arrowContainer.classList.add("selectArrowContainer"),arrowContainer.innerHTML='<div style="visibility:hidden;">0</div>',this.parentNode.appendChild(arrowContainer);var arrow=document.createElement("i");arrow.classList.add("md-icon"),arrow.classList.add("selectArrow"),arrow.innerHTML="",arrowContainer.appendChild(arrow)}},EmbySelectPrototype.setLabel=function(text){var label=this.parentNode.querySelector("label");label.innerHTML=text},document.registerElement("emby-select",{prototype:EmbySelectPrototype,extends:"select"})});
|
||||
define(["layoutManager","browser","actionsheet","css!./emby-select","registerElement"],function(layoutManager,browser,actionsheet){"use strict";function enableNativeMenu(){return!(!browser.edgeUwp&&!browser.xboxOne)||!browser.tizen&&!browser.orsay&&(!!browser.tv||!layoutManager.tv)}function triggerChange(select){var evt=document.createEvent("HTMLEvents");evt.initEvent("change",!1,!0),select.dispatchEvent(evt)}function setValue(select,value){select.value=value}function showActionSheet(select){var labelElem=getLabel(select),title=labelElem?labelElem.textContent||labelElem.innerText:null;actionsheet.show({items:select.options,positionTo:select,title:title}).then(function(value){setValue(select,value),triggerChange(select)})}function getLabel(select){for(var elem=select.previousSibling;elem&&"LABEL"!==elem.tagName;)elem=elem.previousSibling;return elem}function onFocus(e){var label=getLabel(this);label&&(label.classList.add("selectLabelFocused"),label.classList.remove("selectLabelUnfocused"))}function onBlur(e){var label=getLabel(this);label&&(label.classList.add("selectLabelUnfocused"),label.classList.remove("selectLabelFocused"))}function onMouseDown(e){e.button||enableNativeMenu()||(e.preventDefault(),showActionSheet(this))}function onKeyDown(e){switch(e.keyCode){case 13:return void(enableNativeMenu()||(e.preventDefault(),showActionSheet(this)));case 37:case 38:case 39:case 40:return void(layoutManager.tv&&e.preventDefault())}}var EmbySelectPrototype=Object.create(HTMLSelectElement.prototype),inputId=0;EmbySelectPrototype.createdCallback=function(){this.id||(this.id="embyselect"+inputId,inputId++),browser.firefox||this.classList.add("emby-select-withoptioncolor"),this.addEventListener("mousedown",onMouseDown),this.addEventListener("keydown",onKeyDown),this.addEventListener("focus",onFocus),this.addEventListener("blur",onBlur)},EmbySelectPrototype.attachedCallback=function(){if(!this.classList.contains("emby-select")){this.classList.add("emby-select");var label=this.ownerDocument.createElement("label");label.innerHTML=this.getAttribute("label")||"",label.classList.add("selectLabel"),label.classList.add("selectLabelUnfocused"),label.htmlFor=this.id,this.parentNode.insertBefore(label,this);var div=document.createElement("div");div.classList.add("emby-select-selectionbar"),this.parentNode.insertBefore(div,this.nextSibling)}},EmbySelectPrototype.setLabel=function(text){var label=this.parentNode.querySelector("label");label.innerHTML=text},document.registerElement("emby-select",{prototype:EmbySelectPrototype,extends:"select"})});
|
Loading…
Reference in New Issue
Block a user