mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev
This commit is contained in:
@ -1243,6 +1243,23 @@ function isStreamingEnabled() {
|
|||||||
|| (main_api == 'textgenerationwebui' && textgenerationwebui_settings.streaming);
|
|| (main_api == 'textgenerationwebui' && textgenerationwebui_settings.streaming);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function applyFavFilter(enabled) {
|
||||||
|
const selector = ['#rm_print_characters_block .character_select', '#rm_print_characters_block .group_select'].join(',');
|
||||||
|
if (enabled) {
|
||||||
|
$(selector).each(function () {
|
||||||
|
if ($(this).children(".flex-container").children(".ch_fav").length !== 0) {
|
||||||
|
$(this).children(".flex-container").children(".ch_fav").val().toLowerCase().includes(true)
|
||||||
|
? $(this).show()
|
||||||
|
: $(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(selector).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class StreamingProcessor {
|
class StreamingProcessor {
|
||||||
showStopButton(messageId) {
|
showStopButton(messageId) {
|
||||||
if (messageId == -1) {
|
if (messageId == -1) {
|
||||||
@ -3335,6 +3352,7 @@ function select_rm_characters() {
|
|||||||
menu_type = "characters";
|
menu_type = "characters";
|
||||||
selectRightMenuWithAnimation('rm_characters_block');
|
selectRightMenuWithAnimation('rm_characters_block');
|
||||||
setRightTabSelectedClass('rm_button_characters');
|
setRightTabSelectedClass('rm_button_characters');
|
||||||
|
applyFavFilter(window.filterByFav);
|
||||||
}
|
}
|
||||||
|
|
||||||
function restoreSelectedCharacter() {
|
function restoreSelectedCharacter() {
|
||||||
@ -3932,19 +3950,11 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
$("#filter_by_fav").click(function () {
|
$("#filter_by_fav").click(function () {
|
||||||
filterByFav = !filterByFav;
|
filterByFav = !filterByFav;
|
||||||
|
|
||||||
const selector = ['#rm_print_characters_block .character_select', '#rm_print_characters_block .group_select'].join(',');
|
|
||||||
if (filterByFav) {
|
if (filterByFav) {
|
||||||
$(selector).each(function () {
|
applyFavFilter(true);
|
||||||
if ($(this).children(".flex-container").children(".ch_fav").length !== 0) {
|
|
||||||
$(this).children(".flex-container").children(".ch_fav").val().toLowerCase().includes(true)
|
|
||||||
? $(this).show()
|
|
||||||
: $(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#filter_by_fav").addClass("fav_on");
|
$("#filter_by_fav").addClass("fav_on");
|
||||||
} else {
|
} else {
|
||||||
$(selector).show();
|
applyFavFilter(false);
|
||||||
$("#filter_by_fav").removeClass("fav_on");
|
$("#filter_by_fav").removeClass("fav_on");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user