mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix recording icons
This commit is contained in:
parent
a919223fb2
commit
663412b891
14 changed files with 100 additions and 60 deletions
31
dashboard-ui/cordova/imagestore.js
vendored
31
dashboard-ui/cordova/imagestore.js
vendored
|
@ -111,6 +111,11 @@
|
|||
setImageIntoElement(elem, url);
|
||||
}
|
||||
|
||||
//if ($.browser.safari) {
|
||||
// setImageWithSdWebImage(elem, url);
|
||||
// return;
|
||||
//}
|
||||
|
||||
self.getImageUrl(url).done(function (localUrl) {
|
||||
|
||||
setImageIntoElement(elem, localUrl);
|
||||
|
@ -118,6 +123,32 @@
|
|||
}).fail(onFail);
|
||||
};
|
||||
|
||||
var imageIdIndex = 1;
|
||||
|
||||
function setImageWithSdWebImage(elem, url) {
|
||||
|
||||
var rect = elem.getBoundingClientRect();
|
||||
|
||||
var options = {
|
||||
data: url,
|
||||
index: imageIdIndex,
|
||||
quality: 0,
|
||||
scale: Math.round(rect.width) + 'x' + Math.round(rect.height),
|
||||
downloadOptions: window.CollectionRepeatImageOptions.SDWebImageRetryFailed | window.CollectionRepeatImageOptions.SDWebImageLowPriority | window.CollectionRepeatImageOptions.SDWebImageAllowInvalidSSLCertificates
|
||||
};
|
||||
|
||||
if (elem.classList.contains('coveredCardImage')) {
|
||||
options.scale += '!';
|
||||
}
|
||||
|
||||
imageIdIndex++;
|
||||
|
||||
window.CollectionRepeatImage.getImage(options, function (data) {
|
||||
var dataUrl = 'data:image/jpeg;base64,' + data;
|
||||
elem.style.backgroundImage = "url('" + dataUrl + "')";
|
||||
});
|
||||
}
|
||||
|
||||
window.ImageStore = self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue