mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
replace require with Dynamic Imports
This commit is contained in:
parent
64125541fb
commit
b7d9dba32f
3 changed files with 5 additions and 8 deletions
|
@ -141,8 +141,7 @@ import 'css!./style';
|
||||||
|
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
// TODO: remove require
|
import('text!./imageUploader.template.html').then(({default: template}) => {
|
||||||
require(['text!./components/imageUploader/imageUploader.template.html'], template => {
|
|
||||||
|
|
||||||
currentItemId = options.itemId;
|
currentItemId = options.itemId;
|
||||||
currentServerId = options.serverId;
|
currentServerId = options.serverId;
|
||||||
|
|
|
@ -169,8 +169,7 @@ import 'flexStyles';
|
||||||
export function show(itemId, serverId) {
|
export function show(itemId, serverId) {
|
||||||
loading.show();
|
loading.show();
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// TODO: remove require
|
import('text!./itemMediaInfo.template.html').then(({default: template}) => {
|
||||||
require(['text!./components/itemMediaInfo/itemMediaInfo.template.html'], template => {
|
|
||||||
loadMediaInfo(itemId, serverId, template).then(resolve, reject);
|
loadMediaInfo(itemId, serverId, template).then(resolve, reject);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -357,8 +357,7 @@ import 'cardStyle';
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
// TODO: remove require
|
import('text!./itemidentifier.template.html').then(({default: template}) => {
|
||||||
require(['text!./components/itemidentifier/itemidentifier.template.html'], template => {
|
|
||||||
|
|
||||||
const apiClient = getApiClient();
|
const apiClient = getApiClient();
|
||||||
|
|
||||||
|
@ -441,13 +440,13 @@ import 'cardStyle';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO investigate where was used this?
|
||||||
function showEditorFindNew(itemName, itemYear, itemType, resolveFunc) {
|
function showEditorFindNew(itemName, itemYear, itemType, resolveFunc) {
|
||||||
|
|
||||||
currentItem = null;
|
currentItem = null;
|
||||||
currentItemType = itemType;
|
currentItemType = itemType;
|
||||||
|
|
||||||
// TODO: remove require
|
import('text!./itemidentifier.template.html').then(({default: template}) => {
|
||||||
require(['text!./components/itemidentifier/itemidentifier.template.html'], template => {
|
|
||||||
|
|
||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
size: 'small',
|
size: 'small',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue