mirror of
https://github.com/discourse/discourse.git
synced 2025-06-11 07:43:40 +08:00
FEATURE: User page refactor
Re-organise user page so it is easier to find interesting info split it into tabs - Introduce notifications and messages tabs - Stop couting stuff for the user page to speed up rendering - Suppress more information when viewing your own profile
This commit is contained in:
@ -199,6 +199,15 @@ const User = RestModel.extend({
|
||||
ua.action_type === UserAction.TYPES.topics;
|
||||
},
|
||||
|
||||
@computed("groups.@each")
|
||||
displayGroups() {
|
||||
const groups = this.get('groups');
|
||||
const filtered = groups.filter(group => {
|
||||
return !group.automatic || group.name === "moderators";
|
||||
});
|
||||
return filtered.length === 0 ? null : filtered;
|
||||
},
|
||||
|
||||
// The user's stat count, excluding PMs.
|
||||
@computed("statsExcludingPms.@each.count")
|
||||
statsCountNonPM() {
|
||||
@ -233,8 +242,8 @@ const User = RestModel.extend({
|
||||
}));
|
||||
}
|
||||
|
||||
if (!Em.isEmpty(json.user.custom_groups)) {
|
||||
json.user.custom_groups = json.user.custom_groups.map(g => Group.create(g));
|
||||
if (!Em.isEmpty(json.user.groups)) {
|
||||
json.user.groups = json.user.groups.map(g => Group.create(g));
|
||||
}
|
||||
|
||||
if (json.user.invited_by) {
|
||||
|
Reference in New Issue
Block a user