wrap canShare so we can also limit it to views that work

This commit is contained in:
j 2023-08-04 14:28:42 +02:00
commit a8d906743a
4 changed files with 15 additions and 7 deletions

View file

@ -1912,7 +1912,7 @@ pandora.ui.mainMenu = function() {
] },
{},
{ id: 'embed', title: Ox._('Embed...') },
{ id: 'share', title: Ox._('Share...'), disabled: isGuest }
{ id: 'share', title: Ox._('Share...'), disabled: !pandora.canShareView() }
]}
}

View file

@ -330,6 +330,12 @@ pandora.beforeUnloadWindow = function() {
pandora.isUnloading = true;
};
pandora.canShareView = function() {
return pandora.hasCapability('canShare')
};
pandora.changeFolderItemStatus = function(id, status, callback) {
var ui = pandora.user.ui,
folderItems = pandora.getFolderItems(ui.section),