UX: keeps showing icon for more consistency

UX: keeps showing icon for more consistency

diff --git a/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6 b/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
index 0cee0cc..c76de99 100644
--- a/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
+++ b/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
@@ -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");
diff --git a/assets/stylesheets/assigns.scss b/assets/stylesheets/assigns.scss
index 571b885..f908e02 100644
--- a/assets/stylesheets/assigns.scss
+++ b/assets/stylesheets/assigns.scss
@@ -88,11 +88,11 @@
     .avatar {
       position: absolute;
       top: -1px;
-      left: -2px;
+      right: -2px;
     }
 
-    .avatar + .unassign-label {
-      margin-left: 25px;
+    .unassign-label {
+      margin-right: 25px;
     }
   }
 }
diff --git a/assets/stylesheets/mobile/assigns.scss b/assets/stylesheets/mobile/assigns.scss
index 60a644f..3a7b9af 100644
--- a/assets/stylesheets/mobile/assigns.scss
+++ b/assets/stylesheets/mobile/assigns.scss
@@ -13,11 +13,11 @@
     .avatar {
       position: absolute;
       top: -1px;
-      left: -2px;
+      right: -2px;
     }
 
-    .avatar + .unassign-label {
-      margin-left: 25px;
+    .unassign-label {
+      margin-right: 25px;
     }
   }
 }

GitHub sha: c271178f

1 Like