mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
bulk edit: update for new popup
This commit is contained in:
@@ -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');
|
||||
|
Reference in New Issue
Block a user