mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
32 lines
833 B
JavaScript
32 lines
833 B
JavaScript
define(['layoutManager', 'paper-spinner', 'css!./loading'], function (layoutManager) {
|
|
|
|
return {
|
|
show: function () {
|
|
var elem = document.querySelector('.docspinner');
|
|
|
|
if (!elem) {
|
|
|
|
elem = document.createElement("paper-spinner");
|
|
elem.classList.add('docspinner');
|
|
|
|
if (layoutManager.tv) {
|
|
elem.classList.add('tv');
|
|
}
|
|
|
|
document.body.appendChild(elem);
|
|
}
|
|
|
|
elem.active = true;
|
|
elem.classList.remove('loadingHide');
|
|
},
|
|
hide: function () {
|
|
var elem = document.querySelector('.docspinner');
|
|
|
|
if (elem) {
|
|
|
|
elem.active = false;
|
|
elem.classList.add('loadingHide');
|
|
}
|
|
}
|
|
};
|
|
}); |