#1348 Show a full screen loader when bulk deleting characters

This commit is contained in:
Cohee 2023-11-12 21:58:43 +02:00
parent dd12cacd16
commit 2092f849f7
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import {
} from "../script.js";
import { favsToHotswap } from "./RossAscends-mods.js";
import { hideLoader, showLoader } from "./loader.js";
import { convertCharacterToPersona } from "./personas.js";
import { createTagInput, getTagKeyForCharacter, tag_map } from "./tags.js";
@ -614,9 +615,12 @@ class BulkEditOverlay {
const deleteChats = document.getElementById('del_char_checkbox').checked ?? false;
showLoader();
toastr.info("We're deleting your characters, please wait...", 'Working on it');
Promise.all(this.selectedCharacters.map(async characterId => CharacterContextMenu.delete(characterId, deleteChats)))
.then(() => getCharacters())
.then(() => this.browseState())
.finally(() => hideLoader());
}
);
}