diff --git a/app/assets/javascripts/discourse/app/templates/user/badges.hbs b/app/assets/javascripts/discourse/app/templates/user/badges.hbs index 68dd60ea508..8c207965692 100644 --- a/app/assets/javascripts/discourse/app/templates/user/badges.hbs +++ b/app/assets/javascripts/discourse/app/templates/user/badges.hbs @@ -1,16 +1,20 @@ -{{#d-section pageClass="user-badges" class="user-content user-badges-list"}} +{{#d-section pageClass="user-badges" class="user-content"}}

{{i18n "badges.favorite_count" count=this.favoriteBadges.length max=siteSettings.max_favorite_badges}}

- {{#each sortedBadges as |ub|}} - {{badge-card - badge=ub.badge - count=ub.count - canFavorite=ub.can_favorite - isFavorite=ub.is_favorite - username=username - canFavoriteMoreBadges=canFavoriteMoreBadges - onFavoriteClick=(action "favorite" ub) - filterUser="true"}} - {{/each}} + +
+ {{#each sortedBadges as |ub|}} + {{badge-card + badge=ub.badge + count=ub.count + canFavorite=ub.can_favorite + isFavorite=ub.is_favorite + username=username + canFavoriteMoreBadges=canFavoriteMoreBadges + onFavoriteClick=(action "favorite" ub) + filterUser="true" + }} + {{/each}} +
{{/d-section}} diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js index 6274bf797ee..e3d014df891 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-anonymous-test.js @@ -29,7 +29,7 @@ acceptance("User Anonymous", function () { test("Badges", async function (assert) { await visit("/u/eviltrout/badges"); assert.ok($("body.user-badges-page").length, "has the body class"); - assert.ok(exists(".user-badges-list .badge-card"), "shows a badge"); + assert.ok(exists(".badge-group-list .badge-card"), "shows a badge"); }); test("Restricted Routes", async function (assert) { diff --git a/app/assets/stylesheets/desktop/user.scss b/app/assets/stylesheets/desktop/user.scss index 9c9d2169444..de3568b37f6 100644 --- a/app/assets/stylesheets/desktop/user.scss +++ b/app/assets/stylesheets/desktop/user.scss @@ -55,15 +55,6 @@ background-color: var(--secondary); box-sizing: border-box; - &.user-badges-list { - display: flex; - flex-wrap: wrap; - } - - &.user-badges-list .favorite-count { - flex: 100%; - } - .btn.right { float: right; }