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
6f2b1c2ef8
commit
69fad5e57d
9 changed files with 179 additions and 112 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.55",
|
"version": "1.1.56",
|
||||||
"_release": "1.1.55",
|
"_release": "1.1.56",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.55",
|
"tag": "1.1.56",
|
||||||
"commit": "c985db6d4a2c6013dcb3bcb200532144a909732c"
|
"commit": "f0c16b99c8523abcbd5f514d938e520448d6349d"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
|
"_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
|
||||||
"_target": "^1.1.51",
|
"_target": "^1.1.51",
|
||||||
|
|
|
@ -215,7 +215,7 @@
|
||||||
return connectUser;
|
return connectUser;
|
||||||
};
|
};
|
||||||
|
|
||||||
var minServerVersion = '3.0.5818';
|
var minServerVersion = '3.0.5821';
|
||||||
self.minServerVersion = function (val) {
|
self.minServerVersion = function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.3.52",
|
"version": "1.3.54",
|
||||||
"_release": "1.3.52",
|
"_release": "1.3.54",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.3.52",
|
"tag": "1.3.54",
|
||||||
"commit": "c00f1f1e92a8572cd01145ad02137e3eb74442fd"
|
"commit": "5b18c68f85be83718bb5c653da5baeed956bb2bb"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -132,17 +132,20 @@
|
||||||
|
|
||||||
html += '<div class="actionSheetScroller hiddenScrollY">';
|
html += '<div class="actionSheetScroller hiddenScrollY">';
|
||||||
|
|
||||||
options.items.forEach(function (o) {
|
var i, length, option;
|
||||||
o.ironIcon = o.selected ? 'nav:check' : null;
|
var renderIcon = false;
|
||||||
});
|
for (i = 0, length = options.items.length; i < length; i++) {
|
||||||
|
|
||||||
var itemsWithIcons = options.items.filter(function (o) {
|
option = options.items[i];
|
||||||
return o.ironIcon;
|
option.ironIcon = option.selected ? 'nav:check' : null;
|
||||||
});
|
|
||||||
|
if (option.ironIcon) {
|
||||||
|
renderIcon = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If any items have an icon, give them all an icon just to make sure they're all lined up evenly
|
// If any items have an icon, give them all an icon just to make sure they're all lined up evenly
|
||||||
var renderIcon = itemsWithIcons.length;
|
var center = options.title && (!renderIcon /*|| itemsWithIcons.length != options.items.length*/);
|
||||||
var center = options.title && (!itemsWithIcons.length /*|| itemsWithIcons.length != options.items.length*/);
|
|
||||||
|
|
||||||
if (center) {
|
if (center) {
|
||||||
dlg.classList.add('centered');
|
dlg.classList.add('centered');
|
||||||
|
@ -150,12 +153,12 @@
|
||||||
|
|
||||||
var itemTagName = 'paper-button';
|
var itemTagName = 'paper-button';
|
||||||
|
|
||||||
for (var i = 0, length = options.items.length; i < length; i++) {
|
for (i = 0, length = options.items.length; i < length; i++) {
|
||||||
|
|
||||||
var option = options.items[i];
|
option = options.items[i];
|
||||||
|
|
||||||
var autoFocus = option.selected ? ' autoFocus' : '';
|
var autoFocus = option.selected ? ' autoFocus' : '';
|
||||||
html += '<' + itemTagName + autoFocus + ' class="actionSheetMenuItem" data-id="' + option.id + '">';
|
html += '<' + itemTagName + autoFocus + ' class="actionSheetMenuItem" data-id="' + (option.id || option.value) + '">';
|
||||||
|
|
||||||
if (option.ironIcon) {
|
if (option.ironIcon) {
|
||||||
html += '<iron-icon class="actionSheetItemIcon" icon="' + option.ironIcon + '"></iron-icon>';
|
html += '<iron-icon class="actionSheetItemIcon" icon="' + option.ironIcon + '"></iron-icon>';
|
||||||
|
@ -163,7 +166,7 @@
|
||||||
else if (renderIcon && !center) {
|
else if (renderIcon && !center) {
|
||||||
html += '<iron-icon class="actionSheetItemIcon"></iron-icon>';
|
html += '<iron-icon class="actionSheetItemIcon"></iron-icon>';
|
||||||
}
|
}
|
||||||
html += '<div class="actionSheetItemText">' + option.name + '</div>';
|
html += '<div class="actionSheetItemText">' + (option.name || option.textContent || option.innerText) + '</div>';
|
||||||
html += '</' + itemTagName + '>';
|
html += '</' + itemTagName + '>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
"spec"
|
"spec"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/Valve/fingerprintjs2",
|
"homepage": "https://github.com/Valve/fingerprintjs2",
|
||||||
"version": "1.1.4",
|
"version": "1.2.0",
|
||||||
"_release": "1.1.4",
|
"_release": "1.2.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.4",
|
"tag": "1.2.0",
|
||||||
"commit": "ae5719db3d942a1a84ab43b707d4d1c34138934e"
|
"commit": "d5821a481d5c4d4ca348902e3a95b09de2a8702a"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/Valve/fingerprintjs2.git",
|
"_source": "https://github.com/Valve/fingerprintjs2.git",
|
||||||
"_target": "^1.1.3",
|
"_target": "^1.1.3",
|
||||||
|
|
|
@ -13,7 +13,7 @@ Include in the issue:
|
||||||
* Include library call code (I need all options you used when calling the library function)
|
* Include library call code (I need all options you used when calling the library function)
|
||||||
|
|
||||||
## Want to add a feature / contribute?
|
## 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)
|
* Fork the project and make the required changes in it (don't forget to add specs)
|
||||||
* PRs w/out specs will not be accepted
|
* PRs w/out specs will not be accepted
|
||||||
* Run `gulp` to catch stylistic errors and produce the minified version.
|
* 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.2.0 - Modern & flexible browser fingerprint library v2
|
||||||
* https://github.com/Valve/fingerprintjs2
|
* https://github.com/Valve/fingerprintjs2
|
||||||
* Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com)
|
* Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com)
|
||||||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
||||||
|
@ -334,47 +334,6 @@
|
||||||
// and if it doesn't match all 3 then that font is not available.
|
// and if it doesn't match all 3 then that font is not available.
|
||||||
var baseFonts = ["monospace", "sans-serif", "serif"];
|
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 = [
|
var fontList = [
|
||||||
"Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS",
|
"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",
|
"Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style",
|
||||||
|
@ -425,12 +384,116 @@
|
||||||
if(that.options.extendedJsFonts) {
|
if(that.options.extendedJsFonts) {
|
||||||
fontList = fontList.concat(extendedFontList);
|
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 = [];
|
var available = [];
|
||||||
for (var i = 0, l = fontList.length; i < l; i++) {
|
for(var i = 0, l = fontList.length; i < l; i++) {
|
||||||
if(detect(fontList[i])) {
|
if(isFontAvailable(fontsSpans[fontList[i]])) {
|
||||||
available.push(fontList[i]);
|
available.push(fontList[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove spans from DOM
|
||||||
|
h.removeChild(fontsDiv);
|
||||||
|
h.removeChild(baseFontsDiv);
|
||||||
|
|
||||||
keys.push({key: "js_fonts", value: available});
|
keys.push({key: "js_fonts", value: available});
|
||||||
done(keys);
|
done(keys);
|
||||||
}, 1);
|
}, 1);
|
||||||
|
@ -770,11 +833,12 @@
|
||||||
},
|
},
|
||||||
getAdBlock: function(){
|
getAdBlock: function(){
|
||||||
var ads = document.createElement("div");
|
var ads = document.createElement("div");
|
||||||
ads.setAttribute("id", "ads");
|
ads.innerHTML = " ";
|
||||||
|
ads.className = "adsbox";
|
||||||
try {
|
try {
|
||||||
// body may not exist, that's why we need try/catch
|
// body may not exist, that's why we need try/catch
|
||||||
document.body.appendChild(ads);
|
document.body.appendChild(ads);
|
||||||
return document.getElementById("ads") ? false : true;
|
return document.getElementsByClassName("adsbox")[0].offsetHeight === 0;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -787,7 +851,7 @@
|
||||||
if(firstLanguages !== navigator.language.substr(0, 2)){
|
if(firstLanguages !== navigator.language.substr(0, 2)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch(err){
|
} catch(err) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1206,6 +1270,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);
|
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.2.0";
|
||||||
return Fingerprint2;
|
return Fingerprint2;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "fingerprintjs2",
|
"name": "fingerprintjs2",
|
||||||
"version": "1.1.4",
|
"version": "1.2.0",
|
||||||
"description": "Modern & flexible browser fingerprinting library",
|
"description": "Modern & flexible browser fingerprinting library",
|
||||||
"main": "dist/fingerprint2.min.js",
|
"main": "dist/fingerprint2.min.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue