UX: User badges tweaks (#20408)
* UX: fix standalone badge padding * UX: badge number formatting * UX: copy * DEV: Add LinkTo for the admin-badges/show count text * UX: user badge awarded style update --------- Co-authored-by: Martin Brennan <martin@discourse.org>
This commit is contained in:
parent
64d1192bff
commit
ab46a05d77
|
@ -286,10 +286,10 @@
|
||||||
{{#if this.grant_count}}
|
{{#if this.grant_count}}
|
||||||
<div class="content-body current-badge-actions">
|
<div class="content-body current-badge-actions">
|
||||||
<div>
|
<div>
|
||||||
<LinkTo @route="badges.show" @model={{this}}>{{i18n
|
<LinkTo @route="badges.show" @model={{this}}>
|
||||||
"badges.granted"
|
{{number this.grant_count}}
|
||||||
count=this.grant_count
|
{{i18n "badges.awarded"}}
|
||||||
}}</LinkTo>
|
</LinkTo>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -41,15 +41,16 @@
|
||||||
<div class="badge-summary">{{html-safe this.summary}}</div>
|
<div class="badge-summary">{{html-safe this.summary}}</div>
|
||||||
|
|
||||||
{{#if this.displayCount}}
|
{{#if this.displayCount}}
|
||||||
<div class="badge-granted">
|
|
||||||
{{html-safe
|
<LinkTo
|
||||||
(i18n
|
@route="badges.show"
|
||||||
"badges.granted_with_count"
|
@model={{this.badge}}
|
||||||
count=this.displayCount
|
class="badge-granted"
|
||||||
badgeUrl=this.url
|
>
|
||||||
)
|
{{number this.displayCount}}
|
||||||
}}
|
{{i18n "badges.awarded"}}
|
||||||
</div>
|
</LinkTo>
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -132,7 +132,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-granted {
|
.badge-granted {
|
||||||
|
display: block;
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
|
color: var(--primary-medium);
|
||||||
|
font-size: var(--font-down-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.grant-count {
|
.grant-count {
|
||||||
|
@ -191,9 +194,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-info {
|
.badge-info {
|
||||||
display: flex;
|
|
||||||
flex: 1 1 auto;
|
|
||||||
align-items: center;
|
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
@ -216,7 +216,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-contents {
|
.badge-contents {
|
||||||
padding: 0 5%;
|
|
||||||
h3 {
|
h3 {
|
||||||
font-size: var(--font-up-3);
|
font-size: var(--font-up-3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4121,9 +4121,7 @@ en:
|
||||||
granted:
|
granted:
|
||||||
one: "%{count} granted"
|
one: "%{count} granted"
|
||||||
other: "%{count} granted"
|
other: "%{count} granted"
|
||||||
granted_with_count:
|
awarded: awarded
|
||||||
one: '<a href="%{badgeUrl}" title="%{count} granted" class="grant-count">%{count}x</a> <span class="grant-text">granted</span>'
|
|
||||||
other: '<a href="%{badgeUrl}" title="%{count} granted" class="grant-count">%{count}x</a> <span class="grant-text">granted</span>'
|
|
||||||
select_badge_for_title: Select a badge to use as your title
|
select_badge_for_title: Select a badge to use as your title
|
||||||
none: "(none)"
|
none: "(none)"
|
||||||
successfully_granted: "Successfully granted %{badge} to %{username}"
|
successfully_granted: "Successfully granted %{badge} to %{username}"
|
||||||
|
|
Loading…
Reference in New Issue