diff options
-rw-r--r-- | CHANGELOG.md | 8 | ||||
-rw-r--r-- | client/components/users/userHeader.jade | 18 | ||||
-rw-r--r-- | client/components/users/userHeader.js | 20 | ||||
-rw-r--r-- | models/activities.js | 12 | ||||
-rw-r--r-- | models/settings.js | 1 | ||||
-rw-r--r-- | models/users.js | 4 | ||||
-rw-r--r-- | server/migrations.js | 9 | ||||
-rw-r--r-- | server/notifications/notifications.js | 8 |
8 files changed, 20 insertions, 60 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d87532ce..4195c332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# Upcoming Wekan Edge release + +This release fixes the following bugs: + +- [Improve notifications](https://github.com/wekan/wekan/pull/1948). + +Thanks to GitHub user Akuket for contributions. + # v1.53.9 2018-10-11 Wekan Edge release This release adds the following new features: diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index a8fdb143..b6e10d8a 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -17,7 +17,6 @@ template(name="memberMenuPopup") 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'}} if currentUser.isAdmin li: a.js-go-setting(href="{{pathFor 'setting'}}") {{_ 'admin-panel'}} hr @@ -50,23 +49,6 @@ template(name="editProfilePopup") input.js-profile-email(type="email" value="{{emails.[0].address}}" readonly) input.primary.wide(type="submit" value="{{_ 'save'}}") -template(name="editNotificationPopup") - ul.pop-over-list - li - a.js-toggle-tag-notify-watch - i.fa.fa-eye.colorful - | {{_ 'watching'}} - if hasTag "notify-watch" - i.fa.fa-check - span.sub-name {{_ 'notify-watch'}} - li - a.js-toggle-tag-notify-participate - i.fa.fa-bell.colorful - | {{_ 'tracking'}} - if hasTag "notify-participate" - i.fa.fa-check - span.sub-name {{_ 'notify-participate'}} - template(name="changePasswordPopup") +atForm(state='changePwd') diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index d96a9b3d..63cbb14f 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -9,7 +9,6 @@ Template.memberMenuPopup.events({ 'click .js-change-avatar': Popup.open('changeAvatar'), 'click .js-change-password': Popup.open('changePassword'), 'click .js-change-language': Popup.open('changeLanguage'), - 'click .js-edit-notification': Popup.open('editNotification'), 'click .js-logout'(evt) { evt.preventDefault(); @@ -89,25 +88,6 @@ Template.editProfilePopup.events({ }, }); -Template.editNotificationPopup.helpers({ - hasTag(tag) { - const user = Meteor.user(); - return user && user.hasTag(tag); - }, -}); - -// we defined github like rules, see: https://github.com/settings/notifications -Template.editNotificationPopup.events({ - 'click .js-toggle-tag-notify-participate'() { - const user = Meteor.user(); - if (user) user.toggleTag('notify-participate'); - }, - 'click .js-toggle-tag-notify-watch'() { - const user = Meteor.user(); - if (user) user.toggleTag('notify-watch'); - }, -}); - // XXX For some reason the useraccounts autofocus isnt working in this case. // See https://github.com/meteor-useraccounts/core/issues/384 Template.changePasswordPopup.onRendered(function () { diff --git a/models/activities.js b/models/activities.js index c3c8f173..f3dabc6a 100644 --- a/models/activities.js +++ b/models/activities.js @@ -151,18 +151,6 @@ if (Meteor.isServer) { } if (board) { const watchingUsers = _.pluck(_.where(board.watchers, {level: 'watching'}), 'userId'); - const trackingUsers = _.pluck(_.where(board.watchers, {level: 'tracking'}), 'userId'); - const mutedUsers = _.pluck(_.where(board.watchers, {level: 'muted'}), 'userId'); - switch(board.getWatchDefault()) { - case 'muted': - participants = _.intersection(participants, trackingUsers); - watchers = _.intersection(watchers, trackingUsers); - break; - case 'tracking': - participants = _.difference(participants, mutedUsers); - watchers = _.difference(watchers, mutedUsers); - break; - } watchers = _.union(watchers, watchingUsers || []); } diff --git a/models/settings.js b/models/settings.js index bb555cf9..2f82e52f 100644 --- a/models/settings.js +++ b/models/settings.js @@ -116,6 +116,7 @@ if (Meteor.isServer) { url: FlowRouter.url('sign-up'), }; const lang = author.getLanguage(); + Email.send({ to: icode.email, from: Accounts.emailTemplates.from, diff --git a/models/users.js b/models/users.js index f8ccb030..4f2184e4 100644 --- a/models/users.js +++ b/models/users.js @@ -89,10 +89,6 @@ Users.attachSchema(new SimpleSchema({ type: [String], optional: true, }, - 'profile.tags': { - type: [String], - optional: true, - }, 'profile.icode': { type: String, optional: true, diff --git a/server/migrations.js b/server/migrations.js index 1d62d796..5a4126d7 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -333,3 +333,12 @@ Migrations.add('add-authenticationMethod', () => { }, }, noValidateMulti); }); + +Migrations.add('remove-tag', () => { + Users.update({ + }, { + $unset: { + 'profile.tags':1, + }, + }, noValidateMulti); +}); diff --git a/server/notifications/notifications.js b/server/notifications/notifications.js index bc5557e1..72692ef8 100644 --- a/server/notifications/notifications.js +++ b/server/notifications/notifications.js @@ -25,16 +25,12 @@ Notifications = { participants.forEach((userId) => { if (userMap[userId]) return; const user = Users.findOne(userId); - if (user && user.hasTag('notify-participate')) { - userMap[userId] = user; - } + userMap[userId] = user; }); watchers.forEach((userId) => { if (userMap[userId]) return; const user = Users.findOne(userId); - if (user && user.hasTag('notify-watch')) { - userMap[userId] = user; - } + userMap[userId] = user; }); return _.map(userMap, (v) => v); }, |