mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
toast and highlight for new group creation
This commit is contained in:
@ -2276,7 +2276,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
} catch (error) {
|
||||
onError(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//set array object for prompt token itemization of this message
|
||||
let currentArrayEntry = Number(thisPromptBits.length - 1);
|
||||
@ -4232,6 +4232,9 @@ function select_rm_info(type, charId, previousCharId = null) {
|
||||
if (type === 'char_create') {
|
||||
toastr.success(`Character Created: ${charId}`);
|
||||
}
|
||||
if (type === 'group_create') {
|
||||
toastr.success(`Group Created`);
|
||||
}
|
||||
if (type === 'char_import') {
|
||||
toastr.success(`Character Imported: ${charId}`);
|
||||
}
|
||||
@ -4250,6 +4253,16 @@ function select_rm_info(type, charId, previousCharId = null) {
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
if (type === 'group_create') {
|
||||
//for groups, ${charId} = data.id from group-chats.js createGroup()
|
||||
const element = $(`#rm_characters_block [grid="${charId}"]`).get(0);
|
||||
element.scrollIntoView({ behavior: 'smooth', block: 'end' });
|
||||
$(`#rm_characters_block [grid="${charId}"]`).addClass('flash animated');
|
||||
setTimeout(function () {
|
||||
$(`#rm_characters_block [grid="${charId}"]`).removeClass('flash animated');
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
setRightTabSelectedClass();
|
||||
|
||||
if (previousCharId) {
|
||||
|
Reference in New Issue
Block a user