Merge pull request #3360 from SillyTavern/group-member-version Add char version to group panel member names
Signed| @@ -6328,7 +6328,10 @@ | |||
| 6328 | <img alt="Avatar" src="" /> | 6328 | <img alt="Avatar" src="" /> |
| 6329 | </div> | 6329 | </div> |
| 6330 | <div class="group_member_name"> | 6330 | <div class="group_member_name"> |
| 6331 | <div class="ch_name"></div> | 6331 | <div class="character_name_block"> |
| 6332 | <span class="ch_name"></span> | ||
| 6333 | <small class="ch_additional_info character_version"></small> | ||
| 6334 | </div> | ||
| 6332 | <div class="tags tags_inline"></div> | 6335 | <div class="tags tags_inline"></div> |
| 6333 | </div> | 6336 | </div> |
| 6334 | <input class="ch_fav" value="" hidden /> | 6337 | <input class="ch_fav" value="" hidden /> |
| @@ -1368,6 +1368,15 @@ function getGroupCharacterBlock(character) { | |||
| 1368 | template.find('.ch_fav').val(isFav); | 1368 | template.find('.ch_fav').val(isFav); |
| 1369 | template.toggleClass('is_fav', isFav); | 1369 | template.toggleClass('is_fav', isFav); |
| 1370 | 1370 | ||
| 1371 | const auxFieldName = power_user.aux_field || 'character_version'; | ||
| 1372 | const auxFieldValue = (character.data && character.data[auxFieldName]) || ''; | ||
| 1373 | if (auxFieldValue) { | ||
| 1374 | template.find('.character_version').text(auxFieldValue); | ||
| 1375 | } | ||
| 1376 | else { | ||
| 1377 | template.find('.character_version').hide(); | ||
| 1378 | } | ||
| 1379 | |||
| 1371 | let queuePosition = groupChatQueueOrder.get(character.avatar); | 1380 | let queuePosition = groupChatQueueOrder.get(character.avatar); |
| 1372 | if (queuePosition) { | 1381 | if (queuePosition) { |
| 1373 | template.find('.queue_position').text(queuePosition); | 1382 | template.find('.queue_position').text(queuePosition); |
| @@ -2921,7 +2921,7 @@ input[type=search]:focus::-webkit-search-cancel-button { | |||
| 2921 | position: relative; | 2921 | position: relative; |
| 2922 | } | 2922 | } |
| 2923 | 2923 | ||
| 2924 | #rm_print_characters_block .ch_name, | 2924 | .character_name_block .ch_name, |
| 2925 | .avatar-container .ch_name { | 2925 | .avatar-container .ch_name { |
| 2926 | flex: 1 1 auto; | 2926 | flex: 1 1 auto; |
| 2927 | white-space: nowrap; | 2927 | white-space: nowrap; |
| @@ -2931,6 +2931,13 @@ input[type=search]:focus::-webkit-search-cancel-button { | |||
| 2931 | display: block; | 2931 | display: block; |
| 2932 | } | 2932 | } |
| 2933 | 2933 | ||
| 2934 | .character_name_block .character_version { | ||
| 2935 | text-overflow: ellipsis; | ||
| 2936 | overflow: hidden; | ||
| 2937 | text-wrap: nowrap; | ||
| 2938 | max-width: 50%; | ||
| 2939 | } | ||
| 2940 | |||
| 2934 | #rm_print_characters_block .character_name_block> :last-child { | 2941 | #rm_print_characters_block .character_name_block> :last-child { |
| 2935 | flex: 0 100000 auto; | 2942 | flex: 0 100000 auto; |
| 2936 | /* Force shrinking first */ | 2943 | /* Force shrinking first */ |