UX: improve styling on full page search page FEATURE: allow search context in full page search FEATURE: visited color link for full page search FIX: broken search help on fulls page search page FEATURE: allow preload store to return a null FEATURE: "mobileAction" for the header buttons
31 lines
744 B
JavaScript
31 lines
744 B
JavaScript
import computed from 'ember-addons/ember-computed-decorators';
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: 'li',
|
|
classNameBindings: [':header-dropdown-toggle', 'active'],
|
|
|
|
@computed('showUser')
|
|
href(showUser) {
|
|
return showUser ? this.currentUser.get('path') : '';
|
|
},
|
|
|
|
active: Ember.computed.alias('toggleVisible'),
|
|
|
|
actions: {
|
|
toggle() {
|
|
|
|
if (Discourse.Mobile.mobileView && this.get('mobileAction')) {
|
|
this.sendAction('mobileAction');
|
|
return;
|
|
}
|
|
|
|
if (this.siteSettings.login_required && !this.currentUser) {
|
|
this.sendAction('loginAction');
|
|
} else {
|
|
this.toggleProperty('toggleVisible');
|
|
}
|
|
this.appEvents.trigger('dropdowns:closeAll');
|
|
}
|
|
}
|
|
});
|