mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 21:23:45 +08:00
FIX: Badge filtering was always to the currentUser
This commit is contained in:
parent
f4c09e9e90
commit
de0d13e4ef
|
@ -5,11 +5,9 @@ export default Ember.Component.extend({
|
|||
size: 'medium',
|
||||
classNameBindings: [':badge-card', 'size', 'badge.slug'],
|
||||
|
||||
@computed('badge.url', 'filterUser')
|
||||
url(badgeUrl, filterUser) {
|
||||
return (filterUser && this.currentUser) ?
|
||||
`${badgeUrl}?username=${this.currentUser.get('username_lower')}` :
|
||||
badgeUrl;
|
||||
@computed('badge.url', 'filterUser', 'username')
|
||||
url(badgeUrl, filterUser, username) {
|
||||
return filterUser ? `${badgeUrl}?username=${username}` : badgeUrl;
|
||||
},
|
||||
|
||||
@computed('count', 'badge.grant_count')
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
|
||||
{{#each bg.badges as |b|}}
|
||||
{{badge-card badge=b filterUser=b.has_badge}}
|
||||
{{badge-card badge=b filterUser=b.has_badge username=currentUser.username}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{{#d-section pageClass="user-badges" class="user-content user-badges-list"}}
|
||||
{{#each sortedBadges as |ub|}}
|
||||
{{badge-card badge=ub.badge count=ub.count username=username filterUser="true"}}
|
||||
{{badge-card
|
||||
badge=ub.badge
|
||||
count=ub.count
|
||||
username=username
|
||||
filterUser="true"}}
|
||||
{{/each}}
|
||||
{{/d-section}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user