UX: keeps showing icon for more consistency

This commit is contained in:
jjaffeux 2020-05-12 09:30:44 +02:00
parent 2123cfc40e
commit c271178f73
3 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@ function registerTopicFooterButtons(api) {
id: "assign",
icon() {
const hasAssignement = this.get("topic.assigned_to_user");
return hasAssignement ? null : "user-plus";
return hasAssignement ? "user-times" : "user-plus";
},
priority: 250,
title() {
@ -30,10 +30,10 @@ function registerTopicFooterButtons(api) {
if (user) {
const label = I18n.t("discourse_assign.unassign.title");
return htmlSafe(
`${renderAvatar(user, {
`<span class="unassign-label">${label}</span>${renderAvatar(user, {
imageSize: "tiny",
ignoreTitle: true
})} <span class="unassign-label">${label}</span>`
})}`
);
} else {
return I18n.t("discourse_assign.assign.title");

View File

@ -88,11 +88,11 @@
.avatar {
position: absolute;
top: -1px;
left: -2px;
right: -2px;
}
.avatar + .unassign-label {
margin-left: 25px;
.unassign-label {
margin-right: 25px;
}
}
}

View File

@ -13,11 +13,11 @@
.avatar {
position: absolute;
top: -1px;
left: -2px;
right: -2px;
}
.avatar + .unassign-label {
margin-left: 25px;
.unassign-label {
margin-right: 25px;
}
}
}