mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update indexedDb
This commit is contained in:
parent
232f5dba67
commit
9e9ffda3e6
6 changed files with 56 additions and 37 deletions
|
@ -174,6 +174,10 @@
|
|||
max-width: 100%;
|
||||
}
|
||||
|
||||
.fullCardFooter {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.cardText {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
@ -185,7 +189,7 @@
|
|||
}
|
||||
|
||||
.cardContent .cardFooter .cardText {
|
||||
font-size: 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.cardOverlayInner {
|
||||
|
|
|
@ -1506,7 +1506,10 @@
|
|||
var footerOverlayed = false;
|
||||
|
||||
if (options.overlayText || (forceName && !options.showTitle)) {
|
||||
html += LibraryBrowser.getCardFooterText(item, options, imgUrl, forceName, 'cardFooter', progressHtml);
|
||||
|
||||
var footerCssClass = progressHtml ? 'cardFooter fullCardFooter' : 'cardFooter';
|
||||
|
||||
html += LibraryBrowser.getCardFooterText(item, options, imgUrl, forceName, footerCssClass, progressHtml);
|
||||
footerOverlayed = true;
|
||||
}
|
||||
else if (progressHtml) {
|
||||
|
|
|
@ -1373,6 +1373,14 @@ var Dashboard = {
|
|||
return quality;
|
||||
},
|
||||
|
||||
normalizeImageOptions: function(options) {
|
||||
|
||||
if (AppInfo.hasLowImageBandwidth) {
|
||||
|
||||
options.enableImageEnhancers = false;
|
||||
}
|
||||
},
|
||||
|
||||
getAppInfo: function () {
|
||||
|
||||
function generateDeviceName() {
|
||||
|
@ -1588,6 +1596,7 @@ var AppInfo = {};
|
|||
|
||||
if (window.ApiClient) {
|
||||
ApiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
|
||||
ApiClient.normalizeImageOptions = Dashboard.normalizeImageOptions;
|
||||
|
||||
if (!Dashboard.isRunningInCordova()) {
|
||||
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
|
||||
|
|
|
@ -2372,6 +2372,10 @@
|
|||
}
|
||||
|
||||
options.quality = options.quality || self.getDefaultImageQuality(options.type);
|
||||
|
||||
if (self.normalizeImageOptions) {
|
||||
self.normalizeImageOptions(options);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2439,6 +2443,10 @@
|
|||
|
||||
options.quality = options.quality || self.getDefaultImageQuality(options.type);
|
||||
|
||||
if (self.normalizeImageOptions) {
|
||||
self.normalizeImageOptions(options);
|
||||
}
|
||||
|
||||
// Don't put these on the query string
|
||||
delete options.type;
|
||||
delete options.index;
|
||||
|
|
7
dashboard-ui/thirdparty/browser.js
vendored
7
dashboard-ui/thirdparty/browser.js
vendored
|
@ -921,7 +921,12 @@
|
|||
|
||||
var browser = match[1] || "";
|
||||
|
||||
if (ua.indexOf("like gecko") != -1 && ua.indexOf('webkit') == -1 && ua.indexOf('opera') == -1 && ua.indexOf('chrome') == -1 && ua.indexOf('safari') == -1) {
|
||||
if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -1) {
|
||||
|
||||
// http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update
|
||||
browser = "msie";
|
||||
}
|
||||
else if (ua.indexOf("like gecko") != -1 && ua.indexOf('webkit') == -1 && ua.indexOf('opera') == -1 && ua.indexOf('chrome') == -1 && ua.indexOf('safari') == -1) {
|
||||
browser = "msie";
|
||||
}
|
||||
|
||||
|
|
58
dashboard-ui/thirdparty/jquery.unveil-custom.js
vendored
58
dashboard-ui/thirdparty/jquery.unveil-custom.js
vendored
|
@ -12,7 +12,10 @@
|
|||
|
||||
var unveilId = 0;
|
||||
|
||||
$.fn.unveil = function (threshold, callback) {
|
||||
// Test search before setting to 0
|
||||
var threshold = 100;
|
||||
|
||||
$.fn.unveil = function () {
|
||||
|
||||
var $w = $(window),
|
||||
th = threshold || 0,
|
||||
|
@ -68,7 +71,7 @@
|
|||
var lazyItems = $(".lazy", this);
|
||||
|
||||
if (lazyItems.length) {
|
||||
lazyItems.unveil(0);
|
||||
lazyItems.unveil();
|
||||
}
|
||||
|
||||
return this;
|
||||
|
@ -76,7 +79,7 @@
|
|||
|
||||
$.fn.lazyImage = function (url) {
|
||||
|
||||
return this.attr('data-src', url).unveil(0);
|
||||
return this.attr('data-src', url).unveil();
|
||||
};
|
||||
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
@ -96,6 +99,17 @@
|
|||
dataBase.createObjectStore(imagesStoreName);
|
||||
}
|
||||
|
||||
function setImageIntoElement(elem, url) {
|
||||
|
||||
if (elem.tagName === "DIV") {
|
||||
|
||||
elem.style.backgroundImage = "url('" + url + "')";
|
||||
|
||||
} else {
|
||||
elem.setAttribute("src", url);
|
||||
}
|
||||
}
|
||||
|
||||
function openDb() {
|
||||
|
||||
var deferred = $.Deferred();
|
||||
|
@ -281,34 +295,19 @@
|
|||
|
||||
self.setImageInto = function (elem, url) {
|
||||
|
||||
//if (!self.db()) {
|
||||
// if (elem.tagName === "DIV") {
|
||||
|
||||
// elem.style.backgroundImage = "url('" + url + "')";
|
||||
|
||||
// } else {
|
||||
// elem.setAttribute("src", url);
|
||||
// }
|
||||
// return;
|
||||
//}
|
||||
function onFail() {
|
||||
setImageIntoElement(elem, url);
|
||||
}
|
||||
|
||||
openPromise.done(function () {
|
||||
|
||||
self.getImageUrl(url).done(function (localUrl) {
|
||||
|
||||
if (elem.tagName === "DIV") {
|
||||
setImageIntoElement(elem, localUrl);
|
||||
|
||||
elem.style.backgroundImage = "url('" + localUrl + "')";
|
||||
}).fail(onFail);
|
||||
|
||||
} else {
|
||||
elem.setAttribute("src", localUrl);
|
||||
}
|
||||
|
||||
}).fail(function() {
|
||||
new simpleImageStore().setImageInto(elem, url);
|
||||
});
|
||||
|
||||
});
|
||||
}).fail(onFail);
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -317,16 +316,7 @@
|
|||
|
||||
var self = this;
|
||||
|
||||
self.setImageInto = function (elem, url) {
|
||||
|
||||
if (elem.tagName === "DIV") {
|
||||
|
||||
elem.style.backgroundImage = "url('" + url + "')";
|
||||
|
||||
} else {
|
||||
elem.setAttribute("src", url);
|
||||
}
|
||||
};
|
||||
self.setImageInto = setImageIntoElement;
|
||||
}
|
||||
|
||||
if ($.browser.safari && indexedDB) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue