diff --git a/public/css/style.less b/public/css/style.less index 484ea34e1c..c857495090 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -751,6 +751,10 @@ body .navbar .nodebb-inline-block { } } +#mark-allread-btn { + margin-bottom:15px; +} + @-webkit-keyframes scroll-2 /* Safari and Chrome */ { 0% {top: 0px;} diff --git a/public/src/forum/recent.js b/public/src/forum/recent.js index 9cc0c31208..067b595fc8 100644 --- a/public/src/forum/recent.js +++ b/public/src/forum/recent.js @@ -44,7 +44,13 @@ socket.on('event:new_post', function(data) { ++newPostCount; updateAlertText(); - + }); + + $('#mark-allread-btn').on('click', function() { + socket.emit('api:topics.markAllRead'); + $(this).remove(); + $('#topics-container').empty(); + $('#category-no-topics').removeClass('hidden'); }); })(); \ No newline at end of file diff --git a/public/templates/config.json b/public/templates/config.json index 5f00752c23..e88444223a 100644 --- a/public/templates/config.json +++ b/public/templates/config.json @@ -27,6 +27,7 @@ "users/[^]*": "account", "recent": "recent", + "unread": "unread", "popular": "category", "active": "category" }, diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 0c7ae37264..8df622c03f 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -49,10 +49,10 @@