mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-07 06:12:23 +00:00
add custom rendering
This commit is contained in:
parent
026f7a3ab0
commit
0b9853c7e2
@ -171,6 +171,17 @@ function initializeWithApi(api) {
|
|||||||
unacceptPost(post);
|
unacceptPost(post);
|
||||||
this.appEvents.trigger('post-stream:refresh', { id: op.get('id') });
|
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 {
|
export default {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user