Add dummy archived notifications
This commit is contained in:
@@ -33,8 +33,8 @@
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 5px 5px 0 0;
|
border-radius: 5px 5px 0 0;
|
||||||
background-color: #777;
|
background-color: #888;
|
||||||
color: white;
|
color: #fff;
|
||||||
|
|
||||||
.cp-app-notifications-panel-title {
|
.cp-app-notifications-panel-title {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
@@ -114,5 +114,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cp-app-notification-loadmore {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.5rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ define([
|
|||||||
'pads': [
|
'pads': [
|
||||||
'cp-notifications-pads',
|
'cp-notifications-pads',
|
||||||
],
|
],
|
||||||
|
'archived': [
|
||||||
|
'cp-notifications-archived',
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
var create = {};
|
var create = {};
|
||||||
@@ -54,9 +57,7 @@ define([
|
|||||||
|
|
||||||
var notifsData = [];
|
var notifsData = [];
|
||||||
var $div = $('<div>', {'class': 'cp-notifications-' + key + ' cp-sidebarlayout-element'});
|
var $div = $('<div>', {'class': 'cp-notifications-' + key + ' cp-sidebarlayout-element'});
|
||||||
var notifsPanel;
|
var notifsPanel, notifsList, dismissAll;
|
||||||
var notifsList;
|
|
||||||
var dismissAll;
|
|
||||||
notifsPanel = h("div.cp-app-notifications-panel", [
|
notifsPanel = h("div.cp-app-notifications-panel", [
|
||||||
h('div.cp-app-notifications-panel-titlebar', [
|
h('div.cp-app-notifications-panel-titlebar', [
|
||||||
h("span.cp-app-notifications-panel-title",
|
h("span.cp-app-notifications-panel-title",
|
||||||
@@ -69,7 +70,14 @@ define([
|
|||||||
h("div.cp-notification.no-notifications", Messages.notifications_empty),
|
h("div.cp-notification.no-notifications", Messages.notifications_empty),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
$div.append(notifsPanel);
|
$div.append(notifsPanel);
|
||||||
|
if (key === "archived") {
|
||||||
|
var loadmore;
|
||||||
|
loadmore = h("div.cp-app-notification-loadmore.cp-clickable", Messages.loadMore || "Load more ...");
|
||||||
|
$div.append(loadmore);
|
||||||
|
}
|
||||||
|
|
||||||
common.mailbox.subscribe(["notifications"], {
|
common.mailbox.subscribe(["notifications"], {
|
||||||
onMessage: function (data, el) {
|
onMessage: function (data, el) {
|
||||||
@@ -118,6 +126,12 @@ define([
|
|||||||
return makeNotificationList(key, filter);
|
return makeNotificationList(key, filter);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
create['archived'] = function () {
|
||||||
|
var key = 'archived';
|
||||||
|
var filter = ["ARCHIVED"];
|
||||||
|
return makeNotificationList(key, filter);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
var hideCategories = function () {
|
var hideCategories = function () {
|
||||||
APP.$rightside.find('> div').hide();
|
APP.$rightside.find('> div').hide();
|
||||||
@@ -140,6 +154,7 @@ define([
|
|||||||
if (key === 'all') { $category.append($('<span>', {'class': 'fa fa-bars'})); }
|
if (key === 'all') { $category.append($('<span>', {'class': 'fa fa-bars'})); }
|
||||||
if (key === 'friends') { $category.append($('<span>', {'class': 'fa fa-user'})); }
|
if (key === 'friends') { $category.append($('<span>', {'class': 'fa fa-user'})); }
|
||||||
if (key === 'pads') { $category.append($('<span>', {'class': 'cptools cptools-pad'})); }
|
if (key === 'pads') { $category.append($('<span>', {'class': 'cptools cptools-pad'})); }
|
||||||
|
if (key === 'archived') { $category.append($('<span>', {'class': 'fa fa-archive'})); }
|
||||||
|
|
||||||
if (key === active) {
|
if (key === active) {
|
||||||
$category.addClass('cp-leftside-active');
|
$category.addClass('cp-leftside-active');
|
||||||
|
|||||||
Reference in New Issue
Block a user