mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix suggestions
This commit is contained in:
parent
1f3bc8a427
commit
01fd2e056d
1 changed files with 54 additions and 62 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import 'css!components/viewManager/viewContainer';
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function setControllerClass(view, options) {
|
function setControllerClass(view, options) {
|
||||||
|
@ -13,7 +14,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
controllerUrl = Dashboard.getConfigurationResourceUrl(controllerUrl);
|
controllerUrl = Dashboard.getConfigurationResourceUrl(controllerUrl);
|
||||||
return getRequirePromise([controllerUrl]).then((ControllerFactory) => {
|
return import(controllerUrl).then((ControllerFactory) => {
|
||||||
options.controllerFactory = ControllerFactory;
|
options.controllerFactory = ControllerFactory;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -21,12 +22,6 @@
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRequirePromise(deps) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
require(deps, resolve);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function loadView(options) {
|
export function loadView(options) {
|
||||||
if (!options.cancel) {
|
if (!options.cancel) {
|
||||||
const selected = selectedPageIndex;
|
const selected = selectedPageIndex;
|
||||||
|
@ -40,10 +35,8 @@
|
||||||
const isPluginpage = options.url.toLowerCase().indexOf('/configurationpage') !== -1;
|
const isPluginpage = options.url.toLowerCase().indexOf('/configurationpage') !== -1;
|
||||||
const newViewInfo = normalizeNewView(options, isPluginpage);
|
const newViewInfo = normalizeNewView(options, isPluginpage);
|
||||||
const newView = newViewInfo.elem;
|
const newView = newViewInfo.elem;
|
||||||
const modulesToLoad = [];
|
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
require(modulesToLoad, () => {
|
|
||||||
const currentPage = allPages[pageIndex];
|
const currentPage = allPages[pageIndex];
|
||||||
|
|
||||||
if (currentPage) {
|
if (currentPage) {
|
||||||
|
@ -110,7 +103,6 @@
|
||||||
resolve(view);
|
resolve(view);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue