apply suggestion
This commit is contained in:
@@ -218,8 +218,8 @@ import 'flexStyles';
|
||||
});
|
||||
}
|
||||
|
||||
class CollectionEditor {
|
||||
show(options) {
|
||||
export class showEditor {
|
||||
constructor(options) {
|
||||
|
||||
const items = options.items || {};
|
||||
currentServerId = options.serverId;
|
||||
@@ -285,4 +285,4 @@ import 'flexStyles';
|
||||
}
|
||||
|
||||
/* eslint-enable indent */
|
||||
export default CollectionEditor;
|
||||
export default showEditor;
|
||||
|
||||
@@ -319,7 +319,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
||||
switch (id) {
|
||||
case 'addtocollection':
|
||||
require(['collectionEditor'], function (collectionEditor) {
|
||||
new collectionEditor.default().show({
|
||||
new collectionEditor.showEditor({
|
||||
items: [itemId],
|
||||
serverId: serverId
|
||||
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||
@@ -327,7 +327,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'appRouter',
|
||||
break;
|
||||
case 'addtoplaylist':
|
||||
require(['playlistEditor'], function (playlistEditor) {
|
||||
new playlistEditor.default().show({
|
||||
new playlistEditor.showEditor({
|
||||
items: [itemId],
|
||||
serverId: serverId
|
||||
}).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
|
||||
|
||||
@@ -255,7 +255,7 @@ define(['browser', 'appStorage', 'apphost', 'loading', 'connectionManager', 'glo
|
||||
switch (id) {
|
||||
case 'addtocollection':
|
||||
require(['collectionEditor'], function (collectionEditor) {
|
||||
new collectionEditor.default().show({
|
||||
new collectionEditor.showEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
@@ -265,7 +265,7 @@ define(['browser', 'appStorage', 'apphost', 'loading', 'connectionManager', 'glo
|
||||
break;
|
||||
case 'playlist':
|
||||
require(['playlistEditor'], function (playlistEditor) {
|
||||
new playlistEditor.default().show({
|
||||
new playlistEditor.showEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
|
||||
@@ -216,8 +216,8 @@ import 'emby-button';
|
||||
});
|
||||
}
|
||||
|
||||
class PlaylistEditor {
|
||||
show(options) {
|
||||
export class showEditor {
|
||||
constructor(options) {
|
||||
const items = options.items || {};
|
||||
currentServerId = options.serverId;
|
||||
|
||||
@@ -276,4 +276,4 @@ import 'emby-button';
|
||||
}
|
||||
|
||||
/* eslint-enable indent */
|
||||
export default PlaylistEditor;
|
||||
export default showEditor;
|
||||
|
||||
@@ -589,7 +589,7 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
||||
require(['playlistEditor'], function (playlistEditor) {
|
||||
getSaveablePlaylistItems().then(function (items) {
|
||||
var serverId = items.length ? items[0].ServerId : ApiClient.serverId();
|
||||
new playlistEditor.default().show({
|
||||
new playlistEditor.showEditor({
|
||||
items: items.map(function (i) {
|
||||
return i.Id;
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user