Share with friends from sframe and drive

This commit is contained in:
yflory
2019-06-04 15:57:39 +02:00
parent 41c3b38a11
commit c154d020b2
10 changed files with 119 additions and 157 deletions

View File

@@ -7,6 +7,8 @@ define([
var handlers = {};
// Friend request
handlers['FRIEND_REQUEST'] = function (common, data, el) {
var content = data.content;
var msg = content.msg;
@@ -41,6 +43,20 @@ define([
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};
// Share pad
handlers['SHARE_PAD'] = function (common, data, el) {
var content = data.content;
var msg = content.msg;
$(el).find('.cp-notification-content').addClass("cp-clickable");
$(el).find('.cp-notification-content p')
.html(Messages._getKey('notification_padShared', [msg.content.name || Messages.anonymous, msg.content.title]))
.click(function () {
common.openURL(msg.content.href);
});
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};
return {
add: function (common, data, el) {
var type = data.content.msg.type;