1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

support individual library refreshing

This commit is contained in:
Luke Pulverenti 2017-06-23 12:03:11 -04:00
parent b2b7f8d2d3
commit 5a82c4b0ab
104 changed files with 435 additions and 275 deletions

View file

@ -0,0 +1 @@
.progressring{position:relative;width:2.6em;height:2.6em;float:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box}.progressring-bg{width:100%;height:100%;-webkit-border-radius:50%;border-radius:50%;border:.25em solid rgba(0,0,0,1);-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.9);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.spiner-holder-one,.spiner-holder-two{position:absolute;top:0;left:0;overflow:hidden;background:0 0;-webkit-box-sizing:border-box}.progressring-text{text-align:center;color:#ddd;font-size:90%}.spiner-holder-one{width:50%;height:50%;box-sizing:border-box}.spiner-holder-two{width:100%;height:100%;box-sizing:border-box}.progressring-spiner{width:200%;height:200%;-webkit-border-radius:50%;border-radius:50%;border:.25em solid #52B54B;-webkit-box-sizing:border-box;box-sizing:border-box}.animate-0-25-a{-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;-webkit-transition:-webkit-transform 180ms ease-out;-o-transition:transform 180ms ease-out;transition:transform 180ms ease-out}.animate-0-25-b,.animate-25-50-a{-webkit-transition:-webkit-transform 180ms ease-out;-o-transition:transform 180ms ease-out}.animate-0-25-b{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;transition:transform 180ms ease-out}.animate-25-50-a{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;transition:transform 180ms ease-out}.animate-25-50-b,.animate-50-75-a{-webkit-transition:-webkit-transform 180ms ease-out;-o-transition:transform 180ms ease-out}.animate-25-50-b{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;transition:transform 180ms ease-out}.animate-50-75-a{-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;transition:transform 180ms ease-out}.animate-50-75-b,.animate-75-100-a{-webkit-transition:-webkit-transform 180ms ease-out;-o-transition:transform 180ms ease-out}.animate-50-75-b{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;transition:transform 180ms ease-out}.animate-75-100-a{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;transition:transform 180ms ease-out}.animate-75-100-b{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;-webkit-transition:-webkit-transform 180ms ease-out;-o-transition:transform 180ms ease-out;transition:transform 180ms ease-out}

View file

@ -0,0 +1 @@
define(["emby-progressring","dom","serverNotifications","events","registerElement"],function(EmbyProgressRing,dom,serverNotifications,events){"use strict";function addNotificationEvent(instance,name,handler){var localHandler=handler.bind(instance);events.on(serverNotifications,name,localHandler),instance[name]=localHandler}function removeNotificationEvent(instance,name){var handler=instance[name];handler&&(events.off(serverNotifications,name,handler),instance[name]=null)}function onRefreshProgress(e,apiClient,info){var indicator=this;if(indicator.itemId||(indicator.itemId=dom.parentWithAttribute(indicator,"data-id").getAttribute("data-id")),info.ItemId===indicator.itemId){var progress=parseFloat(info.Progress);progress&&progress<100?this.classList.remove("hide"):this.classList.add("hide"),this.setProgress(progress)}}var EmbyItemRefreshIndicatorPrototype=Object.create(EmbyProgressRing);EmbyItemRefreshIndicatorPrototype.createdCallback=function(){EmbyProgressRing.createdCallback&&EmbyProgressRing.createdCallback.call(this),addNotificationEvent(this,"RefreshProgress",onRefreshProgress)},EmbyItemRefreshIndicatorPrototype.attachedCallback=function(){EmbyProgressRing.attachedCallback&&EmbyProgressRing.attachedCallback.call(this)},EmbyItemRefreshIndicatorPrototype.detachedCallback=function(){EmbyProgressRing.detachedCallback&&EmbyProgressRing.detachedCallback.call(this),removeNotificationEvent(this,"RefreshProgress"),this.itemId=null},document.registerElement("emby-itemrefreshindicator",{prototype:EmbyItemRefreshIndicatorPrototype,extends:"div"})});