mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-15 03:12:03 +02:00
Make overlay work with legacy bulk delete button
This commit is contained in:
parent
2d42882a4b
commit
d2bc1e12c3
@ -5526,6 +5526,8 @@ export async function getChatsFromFiles(data, isGroupChat) {
|
|||||||
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
||||||
*/
|
*/
|
||||||
async function getPastCharacterChats() {
|
async function getPastCharacterChats() {
|
||||||
|
if (!characters.includes(this_chid)) return;
|
||||||
|
|
||||||
const response = await fetch("/getallchatsofcharacter", {
|
const response = await fetch("/getallchatsofcharacter", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({ avatar_url: characters[this_chid].avatar }),
|
body: JSON.stringify({ avatar_url: characters[this_chid].avatar }),
|
||||||
|
@ -209,6 +209,7 @@ class BulkEditOverlay {
|
|||||||
static characterClass = 'character_select';
|
static characterClass = 'character_select';
|
||||||
static selectModeClass = 'group_overlay_mode_select';
|
static selectModeClass = 'group_overlay_mode_select';
|
||||||
static selectedClass = 'character_selected';
|
static selectedClass = 'character_selected';
|
||||||
|
static legacySelectedClass = 'bulk_select_checkbox';
|
||||||
|
|
||||||
#state = CharacterGroupOverlayState.browse;
|
#state = CharacterGroupOverlayState.browse;
|
||||||
#longPress = false;
|
#longPress = false;
|
||||||
@ -364,9 +365,11 @@ class BulkEditOverlay {
|
|||||||
|
|
||||||
if (alreadySelected) {
|
if (alreadySelected) {
|
||||||
character.classList.remove(BulkEditOverlay.selectedClass);
|
character.classList.remove(BulkEditOverlay.selectedClass);
|
||||||
|
character.querySelector('.' + BulkEditOverlay.legacySelectedClass).checked = false;
|
||||||
this.dismissCharacter(characterId);
|
this.dismissCharacter(characterId);
|
||||||
} else {
|
} else {
|
||||||
character.classList.add(BulkEditOverlay.selectedClass);
|
character.classList.add(BulkEditOverlay.selectedClass)
|
||||||
|
character.querySelector('.' + BulkEditOverlay.legacySelectedClass).checked = true;
|
||||||
this.selectCharacter(characterId);
|
this.selectCharacter(characterId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user