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

View File

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

View File

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