1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Migrate bundle, qualityOptions, appHost and appLoader

This commit is contained in:
MrTimscampi 2020-07-16 22:19:09 +02:00
parent 9640f13830
commit f16df9788a
39 changed files with 1075 additions and 723 deletions

View file

@ -9,14 +9,14 @@ import 'scrollStyles';
import 'listViewStyle';
function getOffsets(elems) {
let results = [];
const results = [];
if (!document) {
return results;
}
for (const elem of elems) {
let box = elem.getBoundingClientRect();
const box = elem.getBoundingClientRect();
results.push({
top: box.top,
@ -34,7 +34,7 @@ function getPosition(options, dlg) {
const windowHeight = windowSize.innerHeight;
const windowWidth = windowSize.innerWidth;
let pos = getOffsets([options.positionTo])[0];
const pos = getOffsets([options.positionTo])[0];
if (options.positionY !== 'top') {
pos.top += (pos.height || 0) / 2;
@ -82,7 +82,7 @@ export function show(options) {
// positionTo
// showCancel
// title
let dialogOptions = {
const dialogOptions = {
removeOnClose: true,
enableHistory: options.enableHistory,
scrollY: false
@ -103,7 +103,7 @@ export function show(options) {
dialogOptions.autoFocus = false;
}
let dlg = dialogHelper.createDialog(dialogOptions);
const dlg = dialogHelper.createDialog(dialogOptions);
if (isFullscreen) {
dlg.classList.add('actionsheet-fullscreen');
@ -129,7 +129,7 @@ export function show(options) {
}
let renderIcon = false;
let icons = [];
const icons = [];
let itemIcon;
for (const item of options.items) {
itemIcon = item.icon || (item.selected ? 'check' : null);
@ -241,7 +241,7 @@ export function show(options) {
centerFocus(dlg.querySelector('.actionSheetScroller'), false, true);
}
let btnCloseActionSheet = dlg.querySelector('.btnCloseActionSheet');
const btnCloseActionSheet = dlg.querySelector('.btnCloseActionSheet');
if (btnCloseActionSheet) {
btnCloseActionSheet.addEventListener('click', function () {
dialogHelper.close(dlg);