Skip to content

Commit

Permalink
DEV: update deprecated icon name from user-times to user-xmark (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyb-talks authored Jan 9, 2025
1 parent 890d8e1 commit c0c2fde
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
options = options.concat([
{
id: "unassign",
icon: this.group ? "group-times" : "user-times",
icon: this.group ? "group-times" : "user-xmark",
name: I18n.t("discourse_assign.unassign.title"),
description: I18n.t("discourse_assign.unassign.help", {
username: this.assignee,
Expand All @@ -42,7 +42,7 @@ export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
const assignee = assignment_map.assigned_to;
options = options.concat({
id: `unassign_post_${postId}`,
icon: assignee.username ? "user-times" : "group-times",
icon: assignee.username ? "user-xmark" : "group-times",
name: I18n.t("discourse_assign.unassign_post.title"),
description: I18n.t("discourse_assign.unassign_post.help", {
username: assignee.username || assignee.name,
Expand Down
2 changes: 1 addition & 1 deletion assets/javascripts/discourse/components/assign-button.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class AssignButton extends Component {
@service taskActions;

get icon() {
return this.isAssigned ? "user-times" : "user-plus";
return this.isAssigned ? "user-xmark" : "user-plus";
}

get isAssigned() {
Expand Down
12 changes: 6 additions & 6 deletions assets/javascripts/discourse/initializers/extend-for-assigns.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function registerTopicFooterButtons(api) {
icon() {
return this.topic.isAssigned()
? this.site.mobileView
? "user-times"
? "user-xmark"
: null
: "user-plus";
},
Expand Down Expand Up @@ -150,7 +150,7 @@ function registerTopicFooterButtons(api) {
api.registerTopicFooterButton({
id: "unassign-mobile",
icon() {
return "user-times";
return "user-xmark";
},
translatedTitle() {
return defaultTitle(this.topic);
Expand Down Expand Up @@ -398,9 +398,9 @@ function initialize(api) {
api.addPostSmallActionIcon("assigned_to_post", "user-plus");
api.addPostSmallActionIcon("assigned_group", "group-plus");
api.addPostSmallActionIcon("assigned_group_to_post", "group-plus");
api.addPostSmallActionIcon("unassigned", "user-times");
api.addPostSmallActionIcon("unassigned", "user-xmark");
api.addPostSmallActionIcon("unassigned_group", "group-times");
api.addPostSmallActionIcon("unassigned_from_post", "user-times");
api.addPostSmallActionIcon("unassigned_from_post", "user-xmark");
api.addPostSmallActionIcon("unassigned_group_from_post", "group-times");
api.includePostAttributes("assigned_to_user", "assigned_to_group");
api.addPostSmallActionIcon("reassigned", "user-plus");
Expand Down Expand Up @@ -777,7 +777,7 @@ function customizeWidgetPostMenu(api) {
if (post.assigned_to_user || post.assigned_to_group) {
return {
action: "unassignPost",
icon: "user-times",
icon: "user-xmark",
className: "unassign-post",
title: "discourse_assign.unassign_post.title",
position:
Expand Down Expand Up @@ -874,7 +874,7 @@ export default {
api.addBulkActionButton({
id: "unassign-topics",
label: "topics.bulk.unassign",
icon: "user-times",
icon: "user-xmark",
class: "btn-default unassign-topics",
action({ performAndRefresh }) {
performAndRefresh({ type: "unassign" });
Expand Down
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
register_asset "stylesheets/assigns.scss"
register_asset "stylesheets/mobile/assigns.scss", :mobile

%w[user-plus user-times group-plus group-times].each { |i| register_svg_icon(i) }
%w[user-plus user-xmark group-plus group-times].each { |i| register_svg_icon(i) }

module ::DiscourseAssign
PLUGIN_NAME = "discourse-assign"
Expand Down

0 comments on commit c0c2fde

Please sign in to comment.