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

update sync menus

This commit is contained in:
Luke Pulverenti 2016-08-12 11:54:37 -04:00
parent 43a0e6ccea
commit b2fa34662d
62 changed files with 275 additions and 144 deletions

View file

@ -241,6 +241,13 @@
ironIcon: 'call-merge'
});
if (user.Policy.EnableSync && appHost.supports('sync')) {
menuItems.push({
name: globalize.translate('sharedcomponents#MakeAvailableOffline'),
id: 'synclocal'
});
}
menuItems.push({
name: globalize.translate('sharedcomponents#MarkPlayed'),
id: 'markplayed'
@ -257,12 +264,14 @@
ironIcon: 'refresh'
});
menuItems.push({
name: globalize.translate('sharedcomponents#Sync'),
id: 'sync',
ironIcon: 'sync'
});
dispatchNeedsRefresh();
if (user.Policy.EnableSync) {
menuItems.push({
name: globalize.translate('sharedcomponents#SyncToOtherDevice'),
id: 'sync',
ironIcon: 'sync'
});
}
require(['actionsheet'], function (actionsheet) {
actionsheet.show({
@ -284,6 +293,7 @@
});
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'playlist':
require(['playlistEditor'], function (playlistEditor) {
@ -293,12 +303,14 @@
});
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'delete':
deleteItems(items).then(function () {
embyRouter.goHome();
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'groupvideos':
combineVersions(apiClient, items);
@ -308,12 +320,14 @@
apiClient.markPlayed(apiClient.getCurrentUserId(), itemId);
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'markunplayed':
items.forEach(function (itemId) {
apiClient.markUnplayed(apiClient.getCurrentUserId(), itemId);
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'refresh':
require(['refreshDialog'], function (refreshDialog) {
@ -323,6 +337,7 @@
}).show();
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'sync':
require(['syncDialog'], function (syncDialog) {
@ -335,6 +350,20 @@
});
});
hideSelections();
dispatchNeedsRefresh();
break;
case 'synclocal':
require(['syncDialog'], function (syncDialog) {
syncDialog.showMenu({
items: items.map(function (i) {
return {
Id: i
};
})
});
});
hideSelections();
dispatchNeedsRefresh();
break;
default:
break;