mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 23:21:47 +01:00
New change settings option and possibility to hide system messagaes
This commit is contained in:
parent
94cdcff79f
commit
8290dcb249
6 changed files with 61 additions and 13 deletions
|
|
@ -12,10 +12,12 @@ BlazeComponent.extendComponent({
|
|||
const capitalizedMode = Utils.capitalize(mode);
|
||||
const id = Session.get(`current${capitalizedMode}`);
|
||||
const limit = this.page.get() * activitiesPerPage;
|
||||
const user = Meteor.user();
|
||||
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
|
||||
if (id === null)
|
||||
return;
|
||||
|
||||
this.subscribe('activities', mode, id, limit, () => {
|
||||
this.subscribe('activities', mode, id, limit, hideSystem, () => {
|
||||
this.loadNextPageLocked = false;
|
||||
|
||||
// If the sibear peak hasn't increased, that mean that there are no more
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@ template(name="memberMenuPopup")
|
|||
ul.pop-over-list
|
||||
with currentUser
|
||||
li: a.js-edit-profile {{_ 'edit-profile'}}
|
||||
li: a.js-change-avatar {{_ 'edit-avatar'}}
|
||||
li: a.js-change-password {{_ 'changePasswordPopup-title'}}
|
||||
li: a.js-change-language {{_ 'changeLanguagePopup-title'}}
|
||||
li: a.js-edit-notification {{_ 'editNotificationPopup-title'}}
|
||||
li: a.js-change-settings {{_ 'change-settings'}}
|
||||
li: a.js-change-avatar {{_ 'edit-avatar'}}
|
||||
li: a.js-change-password {{_ 'changePasswordPopup-title'}}
|
||||
li: a.js-change-language {{_ 'changeLanguagePopup-title'}}
|
||||
li: a.js-edit-notification {{_ 'editNotificationPopup-title'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li: a.js-logout {{_ 'log-out'}}
|
||||
|
|
@ -61,3 +62,11 @@ template(name="changeLanguagePopup")
|
|||
= name
|
||||
if isCurrentLanguage
|
||||
i.fa.fa-check
|
||||
|
||||
template(name="changeSettingsPopup")
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-toggle-system-messages
|
||||
| {{_ 'hide-system-messages'}}
|
||||
if hiddenSystemMessages
|
||||
i.fa.fa-check
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Template.headerUserBar.events({
|
|||
|
||||
Template.memberMenuPopup.events({
|
||||
'click .js-edit-profile': Popup.open('editProfile'),
|
||||
'click .js-change-settings': Popup.open('changeSettings'),
|
||||
'click .js-change-avatar': Popup.open('changeAvatar'),
|
||||
'click .js-change-password': Popup.open('changePassword'),
|
||||
'click .js-change-language': Popup.open('changeLanguage'),
|
||||
|
|
@ -82,3 +83,15 @@ Template.changeLanguagePopup.events({
|
|||
evt.preventDefault();
|
||||
},
|
||||
});
|
||||
|
||||
Template.changeSettingsPopup.helpers({
|
||||
hiddenSystemMessages() {
|
||||
return Meteor.user().hasHiddenSystemMessages();
|
||||
}
|
||||
});
|
||||
|
||||
Template.changeSettingsPopup.events({
|
||||
'click .js-toggle-system-messages'(evt) {
|
||||
Meteor.call('toggleSystemMessages');
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue