show message in Contacts tab if user has no contacts

pull/1/head
David Benqué 5 years ago
parent db104d6610
commit 718fdb556b

@ -1152,12 +1152,12 @@ define([
var hasFriends = Object.keys(config.friends || {}).length !== 0; var hasFriends = Object.keys(config.friends || {}).length !== 0;
var onFriendShare = Util.mkEvent(); var onFriendShare = Util.mkEvent();
var friendsList = hasFriends ? createShareWithFriends(config, onFriendShare) : undefined; var friendsList = hasFriends ? createShareWithFriends(config, onFriendShare) : h('p', Messages.share_noContacts);
// var friendsUIClass = hasFriends ? '.cp-share-columns' : ''; // var friendsUIClass = hasFriends ? '.cp-share-columns' : '';
onFriendShare.reg(saveValue); onFriendShare.reg(saveValue);
contactsAccessRights = createAccessRights('contact-rights'); var contactsAccessRights = hasFriends ? createAccessRights('contact-rights') : '';
var contacts = h('.cp-share-modal', contactsAccessRights); var contacts = h('.cp-share-modal', contactsAccessRights);
var $contacts = $(contacts); var $contacts = $(contacts);

@ -988,6 +988,7 @@
"share_linkOpen": "Open in new tab", "share_linkOpen": "Open in new tab",
"share_linkCopy": "Copy to clipboard", "share_linkCopy": "Copy to clipboard",
"share_contactCategory": "Contacts", "share_contactCategory": "Contacts",
"share_noContacts": "You have no friends, learn how to get some. // XXX",
"share_embedCategory": "Embed", "share_embedCategory": "Embed",
"share_mediatagCopy": "Copy mediatag to clipboard", "share_mediatagCopy": "Copy mediatag to clipboard",
"loading_pad_1": "Initializing pad", "loading_pad_1": "Initializing pad",

Loading…
Cancel
Save