mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update shared collection editor
This commit is contained in:
parent
69fad5e57d
commit
dcb6b103ec
10 changed files with 133 additions and 44 deletions
|
@ -11,6 +11,11 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
|||
|
||||
var commands = [];
|
||||
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#AddToCollection'),
|
||||
id: 'addtocollection'
|
||||
});
|
||||
|
||||
if (item.CanDelete) {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#Delete'),
|
||||
|
@ -54,6 +59,18 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
|||
|
||||
switch (id) {
|
||||
|
||||
case 'addtocollection':
|
||||
{
|
||||
require(['collectionEditor'], function (collectionEditor) {
|
||||
|
||||
new collectionEditor().show({
|
||||
items: [itemId],
|
||||
serverId: serverId
|
||||
|
||||
}).then(reject, reject);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'download':
|
||||
{
|
||||
require(['fileDownloader'], function (fileDownloader) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue