diff options
Diffstat (limited to 'client/components/users/userHeader.js')
-rw-r--r-- | client/components/users/userHeader.js | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index d96a9b3d..869c9d15 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -3,13 +3,21 @@ Template.headerUserBar.events({ 'click .js-change-avatar': Popup.open('changeAvatar'), }); +Template.memberMenuPopup.helpers({ + templatesBoardId() { + return Meteor.user().getTemplatesBoardId(); + }, + templatesBoardSlug() { + return Meteor.user().getTemplatesBoardSlug(); + }, +}); + 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'), - 'click .js-edit-notification': Popup.open('editNotification'), 'click .js-logout'(evt) { evt.preventDefault(); @@ -87,24 +95,10 @@ Template.editProfilePopup.events({ }); } else Popup.back(); }, -}); - -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'); + 'click #deleteButton'() { + Users.remove(Meteor.userId()); + Popup.close(); + AccountsTemplates.logout(); }, }); |