hotswap: instructions if no faves; no placeholders

This commit is contained in:
RossAscends 2023-09-15 17:55:16 +09:00
parent 5827f9638f
commit 1fed8ba4f7
1 changed files with 11 additions and 3 deletions

View File

@ -336,17 +336,25 @@ export async function favsToHotswap() {
count++; count++;
} }
// there are 6 slots in total, // don't fill leftover spaces with avatar placeholders
if (count < maxCount) { //if any are left over // just evenly space the selected avatars instead
/*
if (count < maxCount) { //if any space is left over
let leftOverSlots = maxCount - count; let leftOverSlots = maxCount - count;
for (let i = 1; i <= leftOverSlots; i++) { for (let i = 1; i <= leftOverSlots; i++) {
newContainer.append(template.clone()); newContainer.append(template.clone());
} }
} }
*/
await Promise.allSettled(promises); await Promise.allSettled(promises);
//helpful instruction message if no characters are favorited
if (count === 0) { container.html(`<small><span><i class="fa-solid fa-star"></i> Favorite characters to add them to HotSwaps</span></small>`) }
//otherwise replace with fav'd characters
if (count > 0) {
container.replaceWith(newContainer); container.replaceWith(newContainer);
} }
}
//changes input bar and send button display depending on connection status //changes input bar and send button display depending on connection status
function RA_checkOnlineStatus() { function RA_checkOnlineStatus() {