Add css class to allow multiple avatar lists

91dabeff53cfc769bcfca32a7fcf2bd499aa9742

Wolfsblvt <wolfsblvt@gmail.com>

4 files changed, +17 -4Showing whitespace changes
public/css/toggle-dependent.css+6 -0
@@ -231,10 +231,16 @@ body.big-avatars .avatars_inline_small .avatar img {
231231body.big-avatars .avatars_inline {
232232 max-height: calc(var(--avatar-base-height) * var(--big-avatar-height-factor) + 2 * var(--avatar-base-border-radius));
233233}
234+body.big-avatars .avatars_inline.avatars_multiline {
235+ max-height: fit-content;
236+}
234237
235238body.big-avatars .avatars_inline.avatars_inline_small {
236239 height: calc(var(--avatar-base-height) * var(--big-avatar-height-factor) * var(--inline-avatar-small-factor) + 2 * var(--avatar-base-border-radius));
237240}
241+body.big-avatars .avatars_inline.avatars_inline_small.avatars_multiline {
242+ height: inherit;
243+}
238244
239245body:not(.big-avatars) .avatars_inline_small .avatar_collage {
240246 min-width: calc(var(--avatar-base-width) * var(--inline-avatar-small-factor));
public/index.html+2 -2
@@ -4981,7 +4981,7 @@
49814981 <div data-i18n="Character">Character</div>
49824982 </div>
49834983 </div>
49844984 <div id="persona_connections_list" class="text_muted m-b-1 avatars_inline flex-containeravatars_multiline scroll-reset-container expander" data-i18n="persona_no_connections">
49854985 [No connections]
49864986 </div>
49874987 </div>
@@ -5039,7 +5039,7 @@
50395039 <div class="right_menu_button fa-solid fa-list-ul" id="rm_button_characters" title="Select/Create Characters" data-i18n="[title]Select/Create Characters"></div>
50405040 </div>
50415041 <div id="HotSwapWrapper" class="alignitemscenter flex-container margin0auto wide100p">
50425042 <div class="hotswap avatars_inline flex-container scroll-reset-container expander" data-i18n="[no_favs]Favorite characters to add them to HotSwaps" no_favs="Favorite characters to add them to HotSwaps"></div>
50435043 </div>
50445044 </div>
50455045 <hr>
public/scripts/personas.js+2 -2
@@ -558,7 +558,7 @@ export async function askForPersonaSelection(title, text, personas) {
558558 content.appendChild(textElement);
559559
560560 const personaListBlock = document.createElement('div');
561561 personaListBlock.classList.add('persona-list', 'avatars_inline', 'flex-containeravatars_multiline');
562562 content.appendChild(personaListBlock);
563563
564564 buildPersonaAvatarList(personaListBlock, personas, { interactable: true });
@@ -1201,7 +1201,7 @@ async function loadPersonaForCurrentChat() {
12011201 toastr.warning(t`More than one persona is connected to this character. Using the first available persona for this chat.`, t`Automatic Persona Selection`);
12021202 } else {
12031203 chatPersona = await askForPersonaSelection(t`Select Persona`,
12041204 t`SelectMultiple onepersonas ofare multipleconnected withto this character. connectedSelect a persona to use for this chat.`,
12051205 connectedPersonas);
12061206 }
12071207 }
public/style.css+7 -0
@@ -1191,6 +1191,8 @@ body.swipeAllMessages .mes:not(.last_mes) .swipes-counter {
11911191}
11921192
11931193.avatars_inline {
1194+ display: flex;
1195+ gap: 5px;
11941196 flex-wrap: wrap;
11951197 overflow: hidden;
11961198 max-height: calc(var(--avatar-base-height) + 2 * var(--avatar-base-border-radius));
@@ -1227,6 +1229,11 @@ body.swipeAllMessages .mes:not(.last_mes) .swipes-counter {
12271229 margin-right: calc(var(--avatar-base-border-radius));
12281230}
12291231
1232+.avatars_multiline {
1233+ max-height: fit-content;
1234+ height: inherit;
1235+}
1236+
12301237.mes_block {
12311238 padding-top: 0;
12321239 padding-left: 10px;