mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 23:17:46 +08:00
UX: Add link to the user's preferences page next to the avatar
This commit is contained in:
@ -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(); },
|
||||
|
Reference in New Issue
Block a user