mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
apply suggestion
This commit is contained in:
parent
3e583fcf21
commit
cf931d429a
8 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||
}),
|
||||
|
|
|
@ -386,7 +386,7 @@ define(['globalize', 'listView', 'layoutManager', 'userSettings', 'focusManager'
|
|||
var instance = this;
|
||||
|
||||
require(['playlistEditor'], function (playlistEditor) {
|
||||
new playlistEditor.default().show({
|
||||
new playlistEditor.showEditor({
|
||||
items: [],
|
||||
serverId: instance.params.serverId
|
||||
});
|
||||
|
|
|
@ -242,7 +242,7 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
|||
tabContent.querySelector('.btnNewCollection').addEventListener('click', function () {
|
||||
require(['collectionEditor'], function (collectionEditor) {
|
||||
var serverId = ApiClient.serverInfo().Id;
|
||||
new collectionEditor.default().show({
|
||||
new collectionEditor.showEditor({
|
||||
items: [],
|
||||
serverId: serverId
|
||||
});
|
||||
|
|
|
@ -184,7 +184,7 @@ define(['loading', 'listView', 'cardBuilder', 'libraryMenu', 'libraryBrowser', '
|
|||
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
|
||||
require(['playlistEditor'], function (playlistEditor) {
|
||||
var serverId = ApiClient.serverInfo().Id;
|
||||
new playlistEditor.default().show({
|
||||
new playlistEditor.showEditor({
|
||||
items: [],
|
||||
serverId: serverId
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue