bulk edit: update for new popup

This commit is contained in:
Cohee
2025-06-03 00:11:01 +03:00
parent 8cf11bccde
commit 8d143a81c3

View File

@@ -17,6 +17,7 @@ import {
import { favsToHotswap } from './RossAscends-mods.js';
import { hideLoader, showLoader } from './loader.js';
import { convertCharacterToPersona } from './personas.js';
import { callGenericPopup, POPUP_TYPE } from './popup.js';
import { createTagInput, getTagKeyForEntity, getTagsList, printTagList, tag_map, compareTagsForSort, removeTagFromMap, importTags, tag_import_setting } from './tags.js';
/**
@@ -835,12 +836,13 @@ class BulkEditOverlay {
*/
handleContextMenuDelete = () => {
const characterIds = this.selectedCharacters;
const popupContent = BulkEditOverlay.#getDeletePopupContentHtml(characterIds);
const promise = callPopup(popupContent, null)
const popupContent = $(BulkEditOverlay.#getDeletePopupContentHtml(characterIds));
const checkbox = popupContent.find('#del_char_checkbox');
const promise = callGenericPopup(popupContent, POPUP_TYPE.CONFIRM)
.then((accept) => {
if (true !== accept) return;
if (!accept) return;
const deleteChats = document.getElementById('del_char_checkbox').checked ?? false;
const deleteChats = checkbox.prop('checked') ?? false;
showLoader();
const toast = toastr.info('We\'re deleting your characters, please wait...', 'Working on it');