Blame view

client/templates/globals/header.js 444 Bytes
334a76815   Ryan Glover   little tasks and ...
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   Ryan Glover   Convert all Coffe...
8
  Template.header.events({
0ccda7775   Ryan Glover   add support for E...
9
10
11
12
    'click .logout' () {
      Meteor.logout( ( error ) => {
        if ( error ) {
          Bert.alert( error.reason, 'warning' );
c8b07469e   Ryan Glover   Add themeteorchef...
13
        } else {
0ccda7775   Ryan Glover   add support for E...
14
          Bert.alert( 'Logged out!', 'success' );
3b214be5e   Ryan Glover   Convert all Coffe...
15
16
17
18
        }
      });
    }
  });