users: get rid of the .with-style class.

Replace with `body[data-current-user-style-usernames="true"]` instead.
This commit is contained in:
evazion
2020-07-13 11:19:37 -05:00
parent b1ccc44c91
commit d7f489b68e
3 changed files with 19 additions and 21 deletions

View File

@@ -190,7 +190,6 @@ module ApplicationHelper
user_class += " user-post-approver" if user.can_approve_posts?
user_class += " user-post-uploader" if user.can_upload_free?
user_class += " user-banned" if user.is_banned?
user_class += " with-style" if CurrentUser.user.style_usernames?
link_to(user.pretty_name, user_path(user), :class => user_class)
end

View File

@@ -249,9 +249,6 @@ Autocomplete.render_item = function(list, item) {
} else if (item.type === "user") {
var level_class = "user-" + item.level.toLowerCase();
$link.addClass(level_class);
if (CurrentUser.data("style-usernames")) {
$link.addClass("with-style");
}
} else if (item.type === "pool") {
$link.addClass("pool-category-" + item.category);
}

View File

@@ -1,23 +1,25 @@
a.user-admin.with-style {
color: var(--user-admin-color);
}
body[data-current-user-style-usernames="true"] {
a.user-admin {
color: var(--user-admin-color);
}
a.user-moderator.with-style {
color: var(--user-moderator-color);
}
a.user-moderator {
color: var(--user-moderator-color);
}
a.user-builder.with-style {
color: var(--user-builder-color);
}
a.user-builder {
color: var(--user-builder-color);
}
a.user-platinum.with-style {
color: var(--user-platinum-color);
}
a.user-platinum {
color: var(--user-platinum-color);
}
a.user-gold.with-style {
color: var(--user-gold-color);
}
a.user-gold {
color: var(--user-gold-color);
}
a.user-member.with-style {
color: var(--user-member-color);
a.user-member {
color: var(--user-member-color);
}
}