This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/header-dropdown.js.es6
2015-08-28 16:11:40 -04:00

18 lines
438 B
JavaScript

export default Ember.Component.extend({
tagName: 'li',
classNameBindings: [':header-dropdown-toggle', 'active'],
active: Ember.computed.alias('toggleVisible'),
actions: {
toggle() {
if (this.siteSettings.login_required && !this.currentUser) {
this.sendAction('loginAction');
} else {
this.toggleProperty('toggleVisible');
}
this.appEvents.trigger('dropdowns:closeAll');
}
}
});