add custom rendering

This commit is contained in:
Sam 2016-12-20 14:04:23 +11:00
parent 026f7a3ab0
commit 0b9853c7e2
1 changed files with 11 additions and 0 deletions

View File

@ -171,6 +171,17 @@ function initializeWithApi(api) {
unacceptPost(post);
this.appEvents.trigger('post-stream:refresh', { id: op.get('id') });
});
if (api.registerConnectorClass) {
api.registerConnectorClass('user-summary-stat', 'solved-count', {
shouldRender(args) {
return args.model.solved_count > 0;
},
setupComponent() {
this.set('classNames', ['linked-stat']);
}
});
}
}
export default {