UX: keeps showing icon for more consistency
This commit is contained in:
parent
2123cfc40e
commit
c271178f73
|
@ -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");
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue