Made favorite characters/groups more apparent

This commit is contained in:
based 2023-08-20 02:30:57 +10:00
parent 0d694dcc32
commit b56fe3e01b
2 changed files with 3 additions and 3 deletions

View File

@ -1003,7 +1003,7 @@ function getCharacterBlock(item, id) {
template.attr({ 'chid': id, 'id': `CharID${id}` }); template.attr({ 'chid': id, 'id': `CharID${id}` });
template.find('img').attr('src', this_avatar); template.find('img').attr('src', this_avatar);
template.find('.avatar').attr('title', item.avatar); template.find('.avatar').attr('title', item.avatar);
template.find('.ch_name').text(item.name); template.find('.ch_name').text(item.name).css('color', item.fav ? 'gold' : 'white');
if (power_user.show_card_avatar_urls) { if (power_user.show_card_avatar_urls) {
template.find('.ch_avatar_url').text(item.avatar); template.find('.ch_avatar_url').text(item.avatar);
} }

View File

@ -336,7 +336,7 @@ export function getGroupBlock(group) {
const template = $("#group_list_template .group_select").clone(); const template = $("#group_list_template .group_select").clone();
template.data("id", group.id); template.data("id", group.id);
template.attr("grid", group.id); template.attr("grid", group.id);
template.find(".ch_name").html(group.name); template.find(".ch_name").html(group.name).css('color', group.fav ? 'gold' : 'white');
template.find('.group_fav_icon').css("display", 'none'); template.find('.group_fav_icon').css("display", 'none');
template.addClass(group.fav ? 'is_fav' : ''); template.addClass(group.fav ? 'is_fav' : '');
template.find(".ch_fav").val(group.fav); template.find(".ch_fav").val(group.fav);
@ -1013,7 +1013,7 @@ function getGroupCharacterBlock(character) {
const isFav = character.fav || character.fav == 'true'; const isFav = character.fav || character.fav == 'true';
template.data("id", character.avatar); template.data("id", character.avatar);
template.find(".avatar img").attr({ "src": avatar, "title": character.avatar }); template.find(".avatar img").attr({ "src": avatar, "title": character.avatar });
template.find(".ch_name").text(character.name); template.find(".ch_name").text(character.name).css('color', character.fav ? 'gold' : 'white');
template.attr("chid", characters.indexOf(character)); template.attr("chid", characters.indexOf(character));
template.find('.ch_fav').val(isFav); template.find('.ch_fav').val(isFav);
template.toggleClass('is_fav', isFav); template.toggleClass('is_fav', isFav);