Fix the 'share a folder' button in the drive

pull/1/head
yflory 6 years ago
parent 0a639851bb
commit ee735c3aa4

@ -2167,15 +2167,21 @@ define([
var data = manager.getSharedFolderData(id); var data = manager.getSharedFolderData(id);
var parsed = Hash.parsePadUrl(data.href); var parsed = Hash.parsePadUrl(data.href);
if (!parsed || !parsed.hash) { return void console.error("Invalid href: "+data.href); } if (!parsed || !parsed.hash) { return void console.error("Invalid href: "+data.href); }
var friends = common.getFriends();
var modal = UIElements.createSFShareModal({ var modal = UIElements.createSFShareModal({
origin: APP.origin, origin: APP.origin,
pathname: "/drive/", pathname: "/drive/",
friends: friends,
title: data.title,
common: common,
hashes: { hashes: {
editHash: parsed.hash editHash: parsed.hash
} }
}); });
$shareBlock.click(function () { $shareBlock.click(function () {
UI.openCustomModal(modal); UI.openCustomModal(modal, {
wide: Object.keys(friends).length !== 0
});
}); });
$container.append($shareBlock); $container.append($shareBlock);
}; };

Loading…
Cancel
Save