mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix some bugs (see below):
1. Remove yellow highlights in hotswaps list. 2. Decrease font size of group members list, make it respect the block limits (1 row for small avatars, 3 rows for big avatars). 3. Fix autoload loading the first character if the latest selected entity was a group. 4. Fix tag key potentially skipping the first character. 5. Fix being unable to open groups from the hotswaps panel. 6. Fix left alignment of hotswaps panel, now centered. 7. Fix rounding of missing group avatars (most noticeable when favorited).
This commit is contained in:
@@ -529,9 +529,11 @@ export function getGroupBlock(group) {
|
||||
// Build inline name list
|
||||
if (Array.isArray(group.members) && group.members.length) {
|
||||
for (const member of group.members) {
|
||||
count++;
|
||||
const character = characters.find(x => x.avatar === member || x.name === member);
|
||||
namesList.push(`<span class="group_ch_name">${character.name}</span>`);
|
||||
if (character) {
|
||||
namesList.push(character.name);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,7 +545,7 @@ export function getGroupBlock(group) {
|
||||
template.addClass(group.fav ? 'is_fav' : '');
|
||||
template.find('.ch_fav').val(group.fav);
|
||||
template.find('.group_select_counter').text(`${count} ${count != 1 ? 'characters' : 'character'}`);
|
||||
template.find('.group_select_block_list').append(namesList.join(''));
|
||||
template.find('.group_select_block_list').text(namesList.join(', '));
|
||||
|
||||
// Display inline tags
|
||||
const tagsElement = template.find('.tags');
|
||||
@@ -1761,7 +1763,7 @@ function doCurMemberListPopout() {
|
||||
|
||||
jQuery(() => {
|
||||
$(document).on('click', '.group_select', function () {
|
||||
const groupId = $(this).data('id');
|
||||
const groupId = $(this).attr('chid') || $(this).attr('grid') || $(this).data('id');
|
||||
openGroupById(groupId);
|
||||
});
|
||||
$('#rm_group_filter').on('input', filterGroupMembers);
|
||||
|
Reference in New Issue
Block a user