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

apply suggestion

This commit is contained in:
grafixeyehero 2020-06-26 21:15:00 +03:00
parent 857c1d8e2a
commit 7fe80dcbf1
2 changed files with 22 additions and 25 deletions

View file

@ -89,9 +89,8 @@ import 'emby-input';
});
}
export class editor {
constructor() {
this.show = (itemType, options, availableOptions) => {
export class showEditor {
constructor(itemType, options, availableOptions) {
return import('text!./components/imageOptionsEditor/imageOptionsEditor.template.html').then(({default: template}) => {
return new Promise((resolve) => {
const dlg = dialogHelper.createDialog({
@ -111,9 +110,8 @@ export class editor {
});
});
});
};
}
}
/* eslint-enable indent */
export default editor;
export default showEditor;

View file

@ -306,7 +306,7 @@ import 'emby-input';
}
function showImageOptionsForType(type) {
import('imageoptionseditor').then(({default: ImageOptionsEditor}) => {
import('imageoptionseditor').then(ImageOptionsEditor => {
let typeOptions = getTypeOptions(currentLibraryOptions, type);
if (!typeOptions) {
typeOptions = {
@ -315,8 +315,7 @@ import 'emby-input';
currentLibraryOptions.TypeOptions.push(typeOptions);
}
const availableOptions = getTypeOptions(currentAvailableOptions || {}, type);
const imageOptionsEditor = new ImageOptionsEditor();
imageOptionsEditor.show(type, typeOptions, availableOptions);
new ImageOptionsEditor.showEditor(type, typeOptions, availableOptions);
});
}