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

Fix suggestions

This commit is contained in:
MrTimscampi 2020-08-01 19:18:03 +02:00
parent 1f3bc8a427
commit 01fd2e056d

View file

@ -1,3 +1,4 @@
import 'css!components/viewManager/viewContainer';
/* eslint-disable indent */
function setControllerClass(view, options) {
@ -13,7 +14,7 @@
}
controllerUrl = Dashboard.getConfigurationResourceUrl(controllerUrl);
return getRequirePromise([controllerUrl]).then((ControllerFactory) => {
return import(controllerUrl).then((ControllerFactory) => {
options.controllerFactory = ControllerFactory;
});
}
@ -21,12 +22,6 @@
return Promise.resolve();
}
function getRequirePromise(deps) {
return new Promise((resolve, reject) => {
require(deps, resolve);
});
}
export function loadView(options) {
if (!options.cancel) {
const selected = selectedPageIndex;
@ -40,10 +35,8 @@
const isPluginpage = options.url.toLowerCase().indexOf('/configurationpage') !== -1;
const newViewInfo = normalizeNewView(options, isPluginpage);
const newView = newViewInfo.elem;
const modulesToLoad = [];
return new Promise((resolve) => {
require(modulesToLoad, () => {
const currentPage = allPages[pageIndex];
if (currentPage) {
@ -110,7 +103,6 @@
resolve(view);
});
});
});
}
}