mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fixed AN hide.show
This commit is contained in:
@ -5667,34 +5667,35 @@ $(document).ready(function () {
|
|||||||
var id = $(this).attr("id");
|
var id = $(this).attr("id");
|
||||||
|
|
||||||
if (id == "option_toggle_AN") {
|
if (id == "option_toggle_AN") {
|
||||||
if (selected_group || this_chid !== undefined
|
if (selected_group || this_chid) {
|
||||||
&& $("#floatingPrompt").css("display") !== 'flex') {
|
if ($("#floatingPrompt").css("display") !== 'flex') {
|
||||||
$("#floatingPrompt").css("display", "flex");
|
$("#floatingPrompt").css("display", "flex");
|
||||||
$("#floatingPrompt").css("opacity", 0.0);
|
$("#floatingPrompt").css("opacity", 0.0);
|
||||||
$("#floatingPrompt").transition({
|
$("#floatingPrompt").transition({
|
||||||
opacity: 1.0,
|
opacity: 1.0,
|
||||||
duration: 250,
|
duration: 250,
|
||||||
easing: animation_easing,
|
easing: animation_easing,
|
||||||
});
|
});
|
||||||
console.log('displayed AN panel');
|
console.log('displayed AN panel');
|
||||||
|
|
||||||
|
if ($("#ANBlockToggle")
|
||||||
|
.siblings('.inline-drawer-content')
|
||||||
|
.css('display') !== 'block') {
|
||||||
|
$("#ANBlockToggle").click();
|
||||||
|
console.log('opened AN box');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$("#floatingPrompt").transition({
|
||||||
|
opacity: 0.0,
|
||||||
|
duration: 250,
|
||||||
|
easing: animation_easing,
|
||||||
|
});
|
||||||
|
setTimeout(function () {
|
||||||
|
$("#floatingPrompt").hide();
|
||||||
|
console.log('hid AN panel');
|
||||||
|
}, 250);
|
||||||
|
|
||||||
if ($("#ANBlockToggle")
|
|
||||||
.siblings('.inline-drawer-content')
|
|
||||||
.css('display') !== 'block') {
|
|
||||||
$("#ANBlockToggle").click();
|
|
||||||
console.log('opened AN box');
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$("#floatingPrompt").transition({
|
|
||||||
opacity: 0.0,
|
|
||||||
duration: 250,
|
|
||||||
easing: animation_easing,
|
|
||||||
});
|
|
||||||
setTimeout(function () {
|
|
||||||
$("#floatingPrompt").hide();
|
|
||||||
console.log('hid AN panel');
|
|
||||||
}, 250);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user