UX: Add link to the user's preferences page next to the avatar

This commit is contained in:
Robin Ward
2017-05-26 15:00:31 -04:00
parent 3384a7dd2a
commit 81c18fc0bd
3 changed files with 11 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import CanCheckEmails from 'discourse/mixins/can-check-emails';
import { propertyNotEqual, setting } from 'discourse/lib/computed';
import { userPath } from 'discourse/lib/url';
import { popupAjaxError } from 'discourse/lib/ajax-error';
import computed from 'ember-addons/ember-computed-decorators';
export default Ember.Controller.extend(CanCheckEmails, {
editingUsername: false,
@ -34,6 +35,11 @@ export default Ember.Controller.extend(CanCheckEmails, {
return [];
}.property('model.user_fields.[]'),
@computed('model.username_lower')
preferencesPath(username) {
return userPath(`${username}/preferences`);
},
actions: {
impersonate() { return this.get("model").impersonate(); },