mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
4048d96ec1
commit
0850fb9c3a
9 changed files with 246 additions and 125 deletions
13
dashboard-ui/bower_components/fetch/.bower.json
vendored
13
dashboard-ui/bower_components/fetch/.bower.json
vendored
|
@ -14,14 +14,15 @@
|
|||
"test/"
|
||||
],
|
||||
"homepage": "https://github.com/github/fetch",
|
||||
"version": "0.11.1",
|
||||
"_release": "0.11.1",
|
||||
"version": "1.0.0",
|
||||
"_release": "1.0.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.11.1",
|
||||
"commit": "7d9a11deec5c0ea2d453390be647ba52695166f8"
|
||||
"tag": "v1.0.0",
|
||||
"commit": "f054e7b5ce2bf7f86c8d7212c2de026800725b84"
|
||||
},
|
||||
"_source": "https://github.com/github/fetch.git",
|
||||
"_target": "^0.11.0",
|
||||
"_originalSource": "fetch"
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "fetch",
|
||||
"_direct": true
|
||||
}
|
80
dashboard-ui/bower_components/fetch/fetch.js
vendored
80
dashboard-ui/bower_components/fetch/fetch.js
vendored
|
@ -5,6 +5,21 @@
|
|||
return
|
||||
}
|
||||
|
||||
var support = {
|
||||
searchParams: 'URLSearchParams' in self,
|
||||
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
||||
blob: 'FileReader' in self && 'Blob' in self && (function() {
|
||||
try {
|
||||
new Blob()
|
||||
return true
|
||||
} catch(e) {
|
||||
return false
|
||||
}
|
||||
})(),
|
||||
formData: 'FormData' in self,
|
||||
arrayBuffer: 'ArrayBuffer' in self
|
||||
}
|
||||
|
||||
function normalizeName(name) {
|
||||
if (typeof name !== 'string') {
|
||||
name = String(name)
|
||||
|
@ -22,6 +37,24 @@
|
|||
return value
|
||||
}
|
||||
|
||||
// Build a destructive iterator for the value list
|
||||
function iteratorFor(items) {
|
||||
var iterator = {
|
||||
next: function() {
|
||||
var value = items.shift()
|
||||
return {done: value === undefined, value: value}
|
||||
}
|
||||
}
|
||||
|
||||
if (support.iterable) {
|
||||
iterator[Symbol.iterator] = function() {
|
||||
return iterator
|
||||
}
|
||||
}
|
||||
|
||||
return iterator
|
||||
}
|
||||
|
||||
function Headers(headers) {
|
||||
this.map = {}
|
||||
|
||||
|
@ -77,6 +110,28 @@
|
|||
}, this)
|
||||
}
|
||||
|
||||
Headers.prototype.keys = function() {
|
||||
var items = []
|
||||
this.forEach(function(value, name) { items.push(name) })
|
||||
return iteratorFor(items)
|
||||
}
|
||||
|
||||
Headers.prototype.values = function() {
|
||||
var items = []
|
||||
this.forEach(function(value) { items.push(value) })
|
||||
return iteratorFor(items)
|
||||
}
|
||||
|
||||
Headers.prototype.entries = function() {
|
||||
var items = []
|
||||
this.forEach(function(value, name) { items.push([name, value]) })
|
||||
return iteratorFor(items)
|
||||
}
|
||||
|
||||
if (support.iterable) {
|
||||
Headers.prototype[Symbol.iterator] = Headers.prototype.entries
|
||||
}
|
||||
|
||||
function consumed(body) {
|
||||
if (body.bodyUsed) {
|
||||
return Promise.reject(new TypeError('Already read'))
|
||||
|
@ -107,23 +162,9 @@
|
|||
return fileReaderReady(reader)
|
||||
}
|
||||
|
||||
var support = {
|
||||
blob: 'FileReader' in self && 'Blob' in self && (function() {
|
||||
try {
|
||||
new Blob()
|
||||
return true
|
||||
} catch(e) {
|
||||
return false
|
||||
}
|
||||
})(),
|
||||
formData: 'FormData' in self,
|
||||
arrayBuffer: 'ArrayBuffer' in self
|
||||
}
|
||||
|
||||
function Body() {
|
||||
this.bodyUsed = false
|
||||
|
||||
|
||||
this._initBody = function(body) {
|
||||
this._bodyInit = body
|
||||
if (typeof body === 'string') {
|
||||
|
@ -132,6 +173,8 @@
|
|||
this._bodyBlob = body
|
||||
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
||||
this._bodyFormData = body
|
||||
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
||||
this._bodyText = body.toString()
|
||||
} else if (!body) {
|
||||
this._bodyText = ''
|
||||
} else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
|
||||
|
@ -146,6 +189,8 @@
|
|||
this.headers.set('content-type', 'text/plain;charset=UTF-8')
|
||||
} else if (this._bodyBlob && this._bodyBlob.type) {
|
||||
this.headers.set('content-type', this._bodyBlob.type)
|
||||
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
||||
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -349,13 +394,8 @@
|
|||
}
|
||||
|
||||
xhr.onload = function() {
|
||||
var status = (xhr.status === 1223) ? 204 : xhr.status
|
||||
if (status < 100 || status > 599) {
|
||||
reject(new TypeError('Network request failed'))
|
||||
return
|
||||
}
|
||||
var options = {
|
||||
status: status,
|
||||
status: xhr.status,
|
||||
statusText: xhr.statusText,
|
||||
headers: headers(xhr),
|
||||
url: responseURL()
|
||||
|
|
|
@ -23,14 +23,15 @@
|
|||
"spec"
|
||||
],
|
||||
"homepage": "https://github.com/Valve/fingerprintjs2",
|
||||
"version": "1.1.4",
|
||||
"_release": "1.1.4",
|
||||
"version": "1.4.0",
|
||||
"_release": "1.4.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.1.4",
|
||||
"commit": "ae5719db3d942a1a84ab43b707d4d1c34138934e"
|
||||
"tag": "1.4.0",
|
||||
"commit": "75cbd474158f8ecce43e00f198c76e486b896937"
|
||||
},
|
||||
"_source": "https://github.com/Valve/fingerprintjs2.git",
|
||||
"_target": "~1.1.2",
|
||||
"_originalSource": "fingerprintjs2"
|
||||
"_target": "^1.4.0",
|
||||
"_originalSource": "fingerprintjs2",
|
||||
"_direct": true
|
||||
}
|
|
@ -13,7 +13,7 @@ Include in the issue:
|
|||
* Include library call code (I need all options you used when calling the library function)
|
||||
|
||||
## Want to add a feature / contribute?
|
||||
|
||||
* Make sure the issue/suggestion does not exist by searching existing issues
|
||||
* Fork the project and make the required changes in it (don't forget to add specs)
|
||||
* PRs w/out specs will not be accepted
|
||||
* Run `gulp` to catch stylistic errors and produce the minified version.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Fingerprintjs2 1.1.4 - Modern & flexible browser fingerprint library v2
|
||||
* Fingerprintjs2 1.4.0 - Modern & flexible browser fingerprint library v2
|
||||
* https://github.com/Valve/fingerprintjs2
|
||||
* Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com)
|
||||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
||||
|
@ -84,6 +84,7 @@
|
|||
keys = this.userAgentKey(keys);
|
||||
keys = this.languageKey(keys);
|
||||
keys = this.colorDepthKey(keys);
|
||||
keys = this.pixelRatioKey(keys);
|
||||
keys = this.screenResolutionKey(keys);
|
||||
keys = this.availableScreenResolutionKey(keys);
|
||||
keys = this.timezoneOffsetKey(keys);
|
||||
|
@ -141,6 +142,15 @@
|
|||
}
|
||||
return keys;
|
||||
},
|
||||
pixelRatioKey: function(keys) {
|
||||
if(!this.options.excludePixelRatio) {
|
||||
keys.push({key: "pixel_ratio", value: this.getPixelRatio()});
|
||||
}
|
||||
return keys;
|
||||
},
|
||||
getPixelRatio: function() {
|
||||
return window.devicePixelRatio || "";
|
||||
},
|
||||
screenResolutionKey: function(keys) {
|
||||
if(!this.options.excludeScreenResolution) {
|
||||
return this.getScreenResolution(keys);
|
||||
|
@ -334,47 +344,6 @@
|
|||
// and if it doesn't match all 3 then that font is not available.
|
||||
var baseFonts = ["monospace", "sans-serif", "serif"];
|
||||
|
||||
//we use m or w because these two characters take up the maximum width.
|
||||
// And we use a LLi so that the same matching fonts can get separated
|
||||
var testString = "mmmmmmmmmmlli";
|
||||
|
||||
//we test using 72px font size, we may use any size. I guess larger the better.
|
||||
var testSize = "72px";
|
||||
|
||||
var h = document.getElementsByTagName("body")[0];
|
||||
|
||||
// create a SPAN in the document to get the width of the text we use to test
|
||||
var s = document.createElement("span");
|
||||
/*
|
||||
* We need this css as in some weird browser this
|
||||
* span elements shows up for a microSec which creates a
|
||||
* bad user experience
|
||||
*/
|
||||
s.style.position = "absolute";
|
||||
s.style.left = "-9999px";
|
||||
s.style.fontSize = testSize;
|
||||
s.innerHTML = testString;
|
||||
var defaultWidth = {};
|
||||
var defaultHeight = {};
|
||||
for (var index = 0, length = baseFonts.length; index < length; index++) {
|
||||
//get the default width for the three base fonts
|
||||
s.style.fontFamily = baseFonts[index];
|
||||
h.appendChild(s);
|
||||
defaultWidth[baseFonts[index]] = s.offsetWidth; //width for the default font
|
||||
defaultHeight[baseFonts[index]] = s.offsetHeight; //height for the defualt font
|
||||
h.removeChild(s);
|
||||
}
|
||||
var detect = function (font) {
|
||||
var detected = false;
|
||||
for (var index = 0, l = baseFonts.length; index < l; index++) {
|
||||
s.style.fontFamily = font + "," + baseFonts[index]; // name of the font along with the base font for fallback.
|
||||
h.appendChild(s);
|
||||
var matched = (s.offsetWidth !== defaultWidth[baseFonts[index]] || s.offsetHeight !== defaultHeight[baseFonts[index]]);
|
||||
h.removeChild(s);
|
||||
detected = detected || matched;
|
||||
}
|
||||
return detected;
|
||||
};
|
||||
var fontList = [
|
||||
"Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS",
|
||||
"Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style",
|
||||
|
@ -425,12 +394,116 @@
|
|||
if(that.options.extendedJsFonts) {
|
||||
fontList = fontList.concat(extendedFontList);
|
||||
}
|
||||
|
||||
//we use m or w because these two characters take up the maximum width.
|
||||
// And we use a LLi so that the same matching fonts can get separated
|
||||
var testString = "mmmmmmmmmmlli";
|
||||
|
||||
//we test using 72px font size, we may use any size. I guess larger the better.
|
||||
var testSize = "72px";
|
||||
|
||||
var h = document.getElementsByTagName("body")[0];
|
||||
|
||||
// div to load spans for the base fonts
|
||||
var baseFontsDiv = document.createElement("div");
|
||||
|
||||
// div to load spans for the fonts to detect
|
||||
var fontsDiv = document.createElement("div");
|
||||
|
||||
var defaultWidth = {};
|
||||
var defaultHeight = {};
|
||||
|
||||
// creates a span where the fonts will be loaded
|
||||
var createSpan = function() {
|
||||
var s = document.createElement("span");
|
||||
/*
|
||||
* We need this css as in some weird browser this
|
||||
* span elements shows up for a microSec which creates a
|
||||
* bad user experience
|
||||
*/
|
||||
s.style.position = "absolute";
|
||||
s.style.left = "-9999px";
|
||||
s.style.fontSize = testSize;
|
||||
s.innerHTML = testString;
|
||||
return s;
|
||||
};
|
||||
|
||||
// creates a span and load the font to detect and a base font for fallback
|
||||
var createSpanWithFonts = function(fontToDetect, baseFont) {
|
||||
var s = createSpan();
|
||||
s.style.fontFamily = "'" + fontToDetect + "'," + baseFont;
|
||||
return s;
|
||||
};
|
||||
|
||||
// creates spans for the base fonts and adds them to baseFontsDiv
|
||||
var initializeBaseFontsSpans = function() {
|
||||
var spans = [];
|
||||
for (var index = 0, length = baseFonts.length; index < length; index++) {
|
||||
var s = createSpan();
|
||||
s.style.fontFamily = baseFonts[index];
|
||||
baseFontsDiv.appendChild(s);
|
||||
spans.push(s);
|
||||
}
|
||||
return spans;
|
||||
};
|
||||
|
||||
// creates spans for the fonts to detect and adds them to fontsDiv
|
||||
var initializeFontsSpans = function() {
|
||||
var spans = {};
|
||||
for(var i = 0, l = fontList.length; i < l; i++) {
|
||||
var fontSpans = [];
|
||||
for(var j = 0, numDefaultFonts = baseFonts.length; j < numDefaultFonts; j++) {
|
||||
var s = createSpanWithFonts(fontList[i], baseFonts[j]);
|
||||
fontsDiv.appendChild(s);
|
||||
fontSpans.push(s);
|
||||
}
|
||||
spans[fontList[i]] = fontSpans; // Stores {fontName : [spans for that font]}
|
||||
}
|
||||
return spans;
|
||||
};
|
||||
|
||||
// checks if a font is available
|
||||
var isFontAvailable = function(fontSpans) {
|
||||
var detected = false;
|
||||
for(var i = 0; i < baseFonts.length; i++) {
|
||||
detected = (fontSpans[i].offsetWidth !== defaultWidth[baseFonts[i]] || fontSpans[i].offsetHeight !== defaultHeight[baseFonts[i]]);
|
||||
if(detected) {
|
||||
return detected;
|
||||
}
|
||||
}
|
||||
return detected;
|
||||
};
|
||||
|
||||
// create spans for base fonts
|
||||
var baseFontsSpans = initializeBaseFontsSpans();
|
||||
|
||||
// add the spans to the DOM
|
||||
h.appendChild(baseFontsDiv);
|
||||
|
||||
// get the default width for the three base fonts
|
||||
for (var index = 0, length = baseFonts.length; index < length; index++) {
|
||||
defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth; // width for the default font
|
||||
defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight; // height for the default font
|
||||
}
|
||||
|
||||
// create spans for fonts to detect
|
||||
var fontsSpans = initializeFontsSpans();
|
||||
|
||||
// add all the spans to the DOM
|
||||
h.appendChild(fontsDiv);
|
||||
|
||||
// check available fonts
|
||||
var available = [];
|
||||
for (var i = 0, l = fontList.length; i < l; i++) {
|
||||
if(detect(fontList[i])) {
|
||||
for(var i = 0, l = fontList.length; i < l; i++) {
|
||||
if(isFontAvailable(fontsSpans[fontList[i]])) {
|
||||
available.push(fontList[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// remove spans from DOM
|
||||
h.removeChild(fontsDiv);
|
||||
h.removeChild(baseFontsDiv);
|
||||
|
||||
keys.push({key: "js_fonts", value: available});
|
||||
done(keys);
|
||||
}, 1);
|
||||
|
@ -616,7 +689,7 @@
|
|||
ctx.font = "11pt no-real-font-123";
|
||||
}
|
||||
ctx.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03", 2, 15);
|
||||
ctx.fillStyle = "rgba(102, 204, 0, 0.7)";
|
||||
ctx.fillStyle = "rgba(102, 204, 0, 0.2)";
|
||||
ctx.font = "18pt Arial";
|
||||
ctx.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03", 4, 45);
|
||||
|
||||
|
@ -770,14 +843,18 @@
|
|||
},
|
||||
getAdBlock: function(){
|
||||
var ads = document.createElement("div");
|
||||
ads.setAttribute("id", "ads");
|
||||
ads.innerHTML = " ";
|
||||
ads.className = "adsbox";
|
||||
var result = false;
|
||||
try {
|
||||
// body may not exist, that's why we need try/catch
|
||||
document.body.appendChild(ads);
|
||||
return document.getElementById("ads") ? false : true;
|
||||
result = document.getElementsByClassName("adsbox")[0].offsetHeight === 0;
|
||||
document.body.removeChild(ads);
|
||||
} catch (e) {
|
||||
return false;
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
},
|
||||
getHasLiedLanguages: function(){
|
||||
//We check if navigator.language is equal to the first language of navigator.languages
|
||||
|
@ -787,7 +864,7 @@
|
|||
if(firstLanguages !== navigator.language.substr(0, 2)){
|
||||
return true;
|
||||
}
|
||||
} catch(err){
|
||||
} catch(err) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1206,6 +1283,6 @@
|
|||
return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8);
|
||||
}
|
||||
};
|
||||
Fingerprint2.VERSION = "1.1.4";
|
||||
Fingerprint2.VERSION = "1.4.0";
|
||||
return Fingerprint2;
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fingerprintjs2",
|
||||
"version": "1.1.4",
|
||||
"version": "1.4.0",
|
||||
"description": "Modern & flexible browser fingerprinting library",
|
||||
"main": "dist/fingerprint2.min.js",
|
||||
"devDependencies": {
|
||||
|
|
|
@ -2020,7 +2020,8 @@
|
|||
imgUrl = ApiClient.getScaledImageUrl(imageItem.ParentThumbItemId, {
|
||||
type: "Thumb",
|
||||
maxWidth: thumbWidth,
|
||||
enableImageEnhancers: enableImageEnhancers
|
||||
enableImageEnhancers: enableImageEnhancers,
|
||||
tag: imageItem.ParentThumbImageTag
|
||||
});
|
||||
|
||||
} else if (options.preferThumb && imageItem.BackdropImageTags && imageItem.BackdropImageTags.length) {
|
||||
|
@ -2115,10 +2116,11 @@
|
|||
|
||||
} else if (imageItem.ParentThumbItemId) {
|
||||
|
||||
imgUrl = ApiClient.getThumbImageUrl(imageItem, {
|
||||
imgUrl = ApiClient.getScaledImageUrl(imageItem.ParentThumbItemId, {
|
||||
type: "Thumb",
|
||||
maxWidth: thumbWidth,
|
||||
enableImageEnhancers: enableImageEnhancers
|
||||
enableImageEnhancers: enableImageEnhancers,
|
||||
tag: imageItem.ParentThumbImageTag
|
||||
});
|
||||
|
||||
} else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist") {
|
||||
|
|
|
@ -1210,7 +1210,7 @@ var Dashboard = {
|
|||
// The native app can handle a little bit more than safari
|
||||
if (AppInfo.isNativeApp) {
|
||||
|
||||
//quality -= 5;
|
||||
quality -= 5;
|
||||
} else {
|
||||
quality -= 15;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue