UX: displays avatar instead of icon on desktop

This commit is contained in:
jjaffeux 2020-05-19 10:51:20 +02:00
parent 6825dcd007
commit cddc0a2eb5
2 changed files with 9 additions and 7 deletions

View File

@ -23,7 +23,11 @@ function registerTopicFooterButtons(api) {
id: "assign",
icon() {
const hasAssignement = this.get("topic.assigned_to_user");
return hasAssignement ? "user-times" : "user-plus";
return hasAssignement
? this.site.mobileView
? "user-times"
: null
: "user-plus";
},
priority: 250,
translatedTitle() {
@ -49,10 +53,10 @@ function registerTopicFooterButtons(api) {
);
} else {
return htmlSafe(
`<span class="unassign-label">${label}</span>${renderAvatar(user, {
`${renderAvatar(user, {
imageSize: "tiny",
ignoreTitle: true
})}`
})}<span class="unassign-label">${label}</span>`
);
}
} else {

View File

@ -88,12 +88,10 @@
padding: 0 12px;
.d-button-label {
display: inline-flex;
align-items: center;
.avatar {
margin-left: 0.25em;
margin-right: 0.25em;
margin-top: -1px;
vertical-align: sub;
}
}
}