mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 18:01:46 +08:00
fab36e6cf7
- Remove all `needs:` code
21 lines
722 B
JavaScript
21 lines
722 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({
|
|
userController: Ember.inject.controller('user'),
|
|
user: Ember.computed.alias('userController.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; },
|
|
});
|