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
7b40f1daff
commit
9b6a17e0a0
8 changed files with 126 additions and 10 deletions
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.6",
|
"version": "1.1.10",
|
||||||
"_release": "1.1.6",
|
"_release": "1.1.10",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.6",
|
"tag": "1.1.10",
|
||||||
"commit": "155d278afe013c0ad06f64616c9b23680cbc545c"
|
"commit": "80b28a8a69cb1ff8269b1443b7982be7c0c5bc8a"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.1.5",
|
"_target": "~1.1.5",
|
||||||
|
|
|
@ -49,6 +49,13 @@
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addCenterFocus(dlg) {
|
||||||
|
|
||||||
|
require(['scrollHelper'], function (scrollHelper) {
|
||||||
|
scrollHelper.centerFocus.on(dlg.querySelector('.actionSheetScroller'), false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function show(options) {
|
function show(options) {
|
||||||
|
|
||||||
// items
|
// items
|
||||||
|
@ -154,6 +161,10 @@
|
||||||
dlg.style.top = pos.top + 'px';
|
dlg.style.top = pos.top + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (layoutManager.tv) {
|
||||||
|
addCenterFocus(dlg);
|
||||||
|
}
|
||||||
|
|
||||||
document.body.appendChild(dlg);
|
document.body.appendChild(dlg);
|
||||||
|
|
||||||
// Seeing an issue in some non-chrome browsers where this is requiring a double click
|
// Seeing an issue in some non-chrome browsers where this is requiring a double click
|
||||||
|
|
102
dashboard-ui/bower_components/emby-webcomponents/scrollhelper.js
vendored
Normal file
102
dashboard-ui/bower_components/emby-webcomponents/scrollhelper.js
vendored
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
define(['focusManager'], function (focusManager) {
|
||||||
|
|
||||||
|
function getOffset(elem) {
|
||||||
|
|
||||||
|
var doc = document;
|
||||||
|
var box = { top: 0, left: 0 };
|
||||||
|
|
||||||
|
if (!doc) {
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
|
||||||
|
var docElem = doc.documentElement;
|
||||||
|
|
||||||
|
// Support: BlackBerry 5, iOS 3 (original iPhone)
|
||||||
|
// If we don't have gBCR, just use 0,0 rather than error
|
||||||
|
if (elem.getBoundingClientRect) {
|
||||||
|
box = elem.getBoundingClientRect();
|
||||||
|
}
|
||||||
|
var win = doc.defaultView;
|
||||||
|
return {
|
||||||
|
top: box.top + win.pageYOffset - docElem.clientTop,
|
||||||
|
left: box.left + win.pageXOffset - docElem.clientLeft
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPosition(scrollContainer, item, horizontal) {
|
||||||
|
var slideeOffset = getOffset(scrollContainer);
|
||||||
|
var itemOffset = getOffset(item);
|
||||||
|
|
||||||
|
var offset = horizontal ? itemOffset.left - slideeOffset.left : itemOffset.top - slideeOffset.top;
|
||||||
|
var size = item[horizontal ? 'offsetWidth' : 'offsetHeight'];
|
||||||
|
|
||||||
|
if (horizontal) {
|
||||||
|
offset += scrollContainer.scrollLeft;
|
||||||
|
} else {
|
||||||
|
offset += scrollContainer.scrollTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
var frameSize = horizontal ? scrollContainer.offsetWidth : scrollContainer.offsetHeight;
|
||||||
|
|
||||||
|
return {
|
||||||
|
start: offset,
|
||||||
|
center: (offset - (frameSize / 2) + (size / 2)),
|
||||||
|
end: offset - frameSize + size,
|
||||||
|
size: size
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function toCenter(container, elem, horizontal) {
|
||||||
|
var pos = getPosition(container, elem, horizontal);
|
||||||
|
|
||||||
|
if (container.scrollTo) {
|
||||||
|
if (horizontal) {
|
||||||
|
container.scrollTo(pos.center, 0);
|
||||||
|
} else {
|
||||||
|
container.scrollTo(0, pos.center);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (horizontal) {
|
||||||
|
container.scrollLeft = Math.round(pos.center);
|
||||||
|
} else {
|
||||||
|
container.scrollTop = Math.round(pos.center);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function centerOnFocus(e, scrollSlider, horizontal) {
|
||||||
|
var focused = focusManager.focusableParent(e.target);
|
||||||
|
|
||||||
|
if (focused) {
|
||||||
|
toCenter(scrollSlider, focused, horizontal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function centerOnFocusHorizontal(e) {
|
||||||
|
centerOnFocus(e, this, true);
|
||||||
|
}
|
||||||
|
function centerOnFocusVertical(e) {
|
||||||
|
centerOnFocus(e, this, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
getPosition: getPosition,
|
||||||
|
centerFocus: {
|
||||||
|
on: function (element, horizontal) {
|
||||||
|
if (horizontal) {
|
||||||
|
element.addEventListener('focus', centerOnFocusHorizontal, true);
|
||||||
|
} else {
|
||||||
|
element.addEventListener('focus', centerOnFocusVertical, true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
off: function (element, horizontal) {
|
||||||
|
if (horizontal) {
|
||||||
|
element.removeEventListener('focus', centerOnFocusHorizontal, true);
|
||||||
|
} else {
|
||||||
|
element.removeEventListener('focus', centerOnFocusVertical, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCenter: toCenter
|
||||||
|
};
|
||||||
|
});
|
|
@ -31,14 +31,14 @@
|
||||||
"web-component-tester": "*",
|
"web-component-tester": "*",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||||
"_release": "1.0.7",
|
"_release": "1.0.7",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.7",
|
"tag": "v1.0.7",
|
||||||
"commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381"
|
"commit": "6f4d152dc3998a6cc12a5a585a654f893dc99381"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-icon"
|
"_originalSource": "PolymerElements/iron-icon"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.2.4",
|
"tag": "v1.2.4",
|
||||||
"commit": "1ee4e2e11a9e5118320987d93fc2c03ae9a489f4"
|
"commit": "1ee4e2e11a9e5118320987d93fc2c03ae9a489f4"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-selector"
|
"_originalSource": "PolymerElements/iron-selector"
|
||||||
}
|
}
|
|
@ -43,7 +43,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="terms hide fieldDescription" style="margin-top: 2em; color: #ccc;"></div>
|
<div class="terms hide fieldDescription" style="margin-top: 2em; color: #ccc;"></div>
|
||||||
<div><br/><br/><iron-icon icon="new-releases" style="color: #52B54B"></iron-icon> Try the new <a href="//tv.emby.media" target="_blank">Emby Theater at tv.emby.media</a>, a remote-friendly app designed for your TV or large screen monitor.</div>
|
<div class="hide tvAppInfo"><br/><br/><iron-icon icon="new-releases" style="color: #52B54B"></iron-icon> Try the new <a href="//tv.emby.media" target="_blank">Emby Theater at tv.emby.media</a>, a remote-friendly app designed for your TV or large screen monitor.</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form class="manualServerForm" style="margin: 0 auto;display:none;">
|
<form class="manualServerForm" style="margin: 0 auto;display:none;">
|
||||||
|
|
|
@ -256,8 +256,10 @@
|
||||||
|
|
||||||
if (AppInfo.isNativeApp) {
|
if (AppInfo.isNativeApp) {
|
||||||
terms.classList.add('hide');
|
terms.classList.add('hide');
|
||||||
|
page.querySelector('.tvAppInfo').classList.add('hide');
|
||||||
} else {
|
} else {
|
||||||
terms.classList.remove('hide');
|
terms.classList.remove('hide');
|
||||||
|
page.querySelector('.tvAppInfo').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#connectLoginPage", function () {
|
}).on('pagebeforeshow', "#connectLoginPage", function () {
|
||||||
|
|
|
@ -1901,6 +1901,7 @@ var AppInfo = {};
|
||||||
define("paperdialoghelper", [embyWebComponentsBowerPath + "/paperdialoghelper/paperdialoghelper"], returnFirstDependency);
|
define("paperdialoghelper", [embyWebComponentsBowerPath + "/paperdialoghelper/paperdialoghelper"], returnFirstDependency);
|
||||||
define("loading", [embyWebComponentsBowerPath + "/loading/loading"], returnFirstDependency);
|
define("loading", [embyWebComponentsBowerPath + "/loading/loading"], returnFirstDependency);
|
||||||
define("toast", [embyWebComponentsBowerPath + "/toast/toast"], returnFirstDependency);
|
define("toast", [embyWebComponentsBowerPath + "/toast/toast"], returnFirstDependency);
|
||||||
|
define("scrollHelper", [embyWebComponentsBowerPath + "/scrollhelper"], returnFirstDependency);
|
||||||
|
|
||||||
// alias
|
// alias
|
||||||
define("historyManager", [], function () {
|
define("historyManager", [], function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue