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:
Sam
2015-12-17 18:06:04 +11:00
parent c3f08145b8
commit a8b5192efd
38 changed files with 371 additions and 194 deletions

View File

@ -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) {