mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
message-controls: Use <i> tag for starred message icon.
Throughout the codebase we use <i> tag for icons. This commit will add <i> tag inside the starred message div and fa classes are now used with this <i> tag. The starred message div is now consistent with other message_controls divs. Tweaked by tabbott to use the name star_container for better readability.
This commit is contained in:
committed by
Tim Abbott
parent
ae7ff04fe6
commit
d0fd0cae3f
@@ -95,10 +95,13 @@ exports.update_starred_view = function (message_id, new_value) {
|
||||
// table in which it is visible.
|
||||
update_message_in_all_views(message_id, (row) => {
|
||||
const elt = row.find(".star");
|
||||
const star_container = row.find(".star_container");
|
||||
if (starred) {
|
||||
elt.addClass("fa-star").removeClass("fa-star-o").removeClass("empty-star");
|
||||
elt.addClass("fa-star").removeClass("fa-star-o");
|
||||
star_container.removeClass("empty-star");
|
||||
} else {
|
||||
elt.removeClass("fa-star").addClass("fa-star-o").addClass("empty-star");
|
||||
elt.removeClass("fa-star").addClass("fa-star-o");
|
||||
star_container.addClass("empty-star");
|
||||
}
|
||||
const title_state = starred ? i18n.t("Unstar") : i18n.t("Star");
|
||||
elt.attr("title", i18n.t("__starred_status__ this message", {starred_status: title_state}));
|
||||
|
||||
Reference in New Issue
Block a user