diff options
Diffstat (limited to 'client/button.js')
| -rw-r--r-- | client/button.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/button.js b/client/button.js index 4c5eafa..3b7e936 100644 --- a/client/button.js +++ b/client/button.js @@ -229,6 +229,24 @@ Template.photo.helpers({ } }) +Template.about.events({ + 'click button.start-over': function (event) { + if (Meteor.userId()) { + Router.go('dates'); + } + else { + Router.go('login'); + } + }, + 'click button.logout': function (event) { + $('body').append('<div style="display:none;"><iframe src="https://instagram.com/accounts/logout"></iframe></div>'); + Meteor.logout(); + _.delay(function () { + Router.go('login'); + }, 500); + } +}) + Accounts.onLogin(function() { if (Router.current().route.getName() == 'login') { Router.go('dates'); |
