Blame view
client/templates/globals/header.js
545 Bytes
334a76815
|
1 2 3 4 5 6 7 |
Template.header.helpers({ brandLink() { let login = FlowRouter.path( 'login' ), index = FlowRouter.path( 'index' ); return !Meteor.loggingIn() && !Meteor.userId() ? login : index; } }); |
3b214be5e
|
8 |
Template.header.events({ |
0ccda7775
|
9 10 11 12 |
'click .logout' () { Meteor.logout( ( error ) => { if ( error ) { Bert.alert( error.reason, 'warning' ); |
c8b07469e
|
13 |
} else { |
0ccda7775
|
14 |
Bert.alert( 'Logged out!', 'success' ); |
77001041a
|
15 16 |
FlowRouter.go( FlowRouter.path( 'login' ) ); Session.set( 'currentRoute', 'login' ); |
3b214be5e
|
17 18 19 20 |
} }); } }); |