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

Fix require

This commit is contained in:
MrTimscampi 2020-08-06 22:48:26 +02:00
parent 936ff4186d
commit 453079fe06
3 changed files with 6 additions and 7 deletions

View file

@ -4,7 +4,8 @@ define(['require', 'inputManager', 'browser', 'globalize', 'connectionManager',
playbackManager = playbackManager.default || playbackManager; playbackManager = playbackManager.default || playbackManager;
browser = browser.default || browser; browser = browser.default || browser;
loading = loading.default || loading; loading = loading.default || loading;
focusManager = focusManager.default || focusManager;scrollHelper = scrollHelper.default || scrollHelper; focusManager = focusManager.default || focusManager;
scrollHelper = scrollHelper.default || scrollHelper;
serverNotifications = serverNotifications.default || serverNotifications; serverNotifications = serverNotifications.default || serverNotifications;
function showViewSettings(instance) { function showViewSettings(instance) {

View file

@ -3,7 +3,6 @@ import dom from 'dom';
import 'scrollStyles'; import 'scrollStyles';
function getBoundingClientRect(elem) { function getBoundingClientRect(elem) {
// Support: BlackBerry 5, iOS 3 (original iPhone) // Support: BlackBerry 5, iOS 3 (original iPhone)
// If we don't have gBCR, just use 0,0 rather than error // If we don't have gBCR, just use 0,0 rather than error
if (elem.getBoundingClientRect) { if (elem.getBoundingClientRect) {
@ -14,7 +13,6 @@ function getBoundingClientRect(elem) {
} }
export function getPosition(scrollContainer, item, horizontal) { export function getPosition(scrollContainer, item, horizontal) {
const slideeOffset = getBoundingClientRect(scrollContainer); const slideeOffset = getBoundingClientRect(scrollContainer);
const itemOffset = getBoundingClientRect(item); const itemOffset = getBoundingClientRect(item);
@ -130,7 +128,7 @@ export const centerFocus = {
}); });
} }
} }
} };
export default { export default {
getPosition: getPosition, getPosition: getPosition,

View file

@ -15,12 +15,12 @@ function notifyApp() {
function displayMessage(cmd) { function displayMessage(cmd) {
const args = cmd.Arguments; const args = cmd.Arguments;
if (args.TimeoutMs) { if (args.TimeoutMs) {
require(['toast'], function (toast) { import('toast').then((toast) => {
toast({ title: args.Header, text: args.Text }); toast({ title: args.Header, text: args.Text });
}); });
} else { } else {
require(['alert'], function (alert) { import('alert').then((alert) => {
alert.default({ title: args.Header, text: args.Text }); alert({ title: args.Header, text: args.Text });
}); });
} }
} }