Middle clicking the avatar should go to profile
This commit is contained in:
parent
12e0225c51
commit
7516643f11
|
@ -1,7 +1,14 @@
|
|||
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: {
|
||||
|
|
|
@ -60,12 +60,6 @@ const User = RestModel.extend({
|
|||
return ('background-image: url(' + Discourse.getURLWithCDN(bgUrl) + ')').htmlSafe();
|
||||
},
|
||||
|
||||
/**
|
||||
Path to this user.
|
||||
|
||||
@property path
|
||||
@type {String}
|
||||
**/
|
||||
path: function(){
|
||||
return Discourse.getURL('/users/' + this.get('username_lower'));
|
||||
// no need to observe, requires a hard refresh to update
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<a {{action "toggle"}} class='icon' href title={{i18n title}} aria-label={{i18n title}} id={{iconId}}>
|
||||
<a {{action "toggle"}} class='icon' href={{href}} title={{i18n title}} aria-label={{i18n title}} id={{iconId}}>
|
||||
{{#if showUser}}
|
||||
{{bound-avatar currentUser "medium"}}
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue