mirror of
https://github.com/discourse/discourse.git
synced 2025-02-04 16:01:43 +08:00
e808f7f41e
Added "Top Links" list Added "Most Liked By" list Added "Bookmark count" stat UX: Use fa heart icon instead of "like" text in stats Change the order of the user stats
21 lines
692 B
JavaScript
21 lines
692 B
JavaScript
import computed from 'ember-addons/ember-computed-decorators';
|
|
|
|
// should be kept in sync with 'UserSummary::MAX_SUMMARY_RESULTS'
|
|
const MAX_SUMMARY_RESULTS = 6;
|
|
// should be kept in sync with 'UserSummary::MAX_BADGES'
|
|
const MAX_BADGES = 6;
|
|
|
|
export default Ember.Controller.extend({
|
|
needs: ['user'],
|
|
user: Ember.computed.alias('controllers.user.model'),
|
|
|
|
@computed("model.topics.length")
|
|
moreTopics(topicsLength) { return topicsLength >= MAX_SUMMARY_RESULTS; },
|
|
|
|
@computed("model.replies.length")
|
|
moreReplies(repliesLength) { return repliesLength >= MAX_SUMMARY_RESULTS; },
|
|
|
|
@computed("model.badges.length")
|
|
moreBadges(badgesLength) { return badgesLength >= MAX_BADGES; },
|
|
});
|