Add button in toolbar notifications to go to app

This commit is contained in:
ClemDee 2019-07-01 11:09:06 +02:00
parent 8448acf220
commit 999ba592a9
2 changed files with 19 additions and 0 deletions

View File

@ -39,6 +39,18 @@
}
}
}
.cp-notifications-gotoapp {
background-color: #ccc;
p {
padding: 10px 0 !important;
text-align: center !important;
font-weight: bold;
cursor: pointer;
&:hover {
background-color: rgba(0,0,0,0.1);
}
}
}
}

View File

@ -944,10 +944,17 @@ MessengerUI, Messages) {
var createNotifications = function (toolbar, config) {
var $notif = toolbar.$top.find('.'+NOTIFICATIONS_CLS).show();
var openNotifsApp = h('div.cp-notifications-gotoapp', h('p', Messages.openNotificationsApp || "Open notifications App"));
$(openNotifsApp).click(function () {
Common.openURL("/notifications");
})
var div = h('div.cp-notifications-container', [
h('div.cp-notifications-empty', Messages.notifications_empty)
]);
var pads_options = [div];
if (Common.isLoggedIn()) {
pads_options.unshift(openNotifsApp);
}
var dropdownConfig = {
text: '', // Button initial text
options: pads_options, // Entries displayed in the menu