mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix resetting preset on load of API
This commit is contained in:
@ -312,7 +312,10 @@ function checkOnlineStatus() {
|
|||||||
} else {
|
} else {
|
||||||
$("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message
|
$("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message
|
||||||
$("#send_form").css("background-color", "rgba(0,0,0,0.7)"); //on connect, form BG changes to transprent black
|
$("#send_form").css("background-color", "rgba(0,0,0,0.7)"); //on connect, form BG changes to transprent black
|
||||||
|
|
||||||
|
if (!is_send_press) {
|
||||||
$("#send_but").css("display", "inline"); //on connect, send button shows up
|
$("#send_but").css("display", "inline"); //on connect, send button shows up
|
||||||
|
}
|
||||||
|
|
||||||
$("#online_status_indicator2").css("background-color", "green");
|
$("#online_status_indicator2").css("background-color", "green");
|
||||||
$("#online_status_text2").html(online_status);
|
$("#online_status_text2").html(online_status);
|
||||||
@ -1888,7 +1891,6 @@ function changeMainAPI() {
|
|||||||
$("#max_context_block").css("display", "block");
|
$("#max_context_block").css("display", "block");
|
||||||
$("#amount_gen_block").css("display", "block");
|
$("#amount_gen_block").css("display", "block");
|
||||||
$("#softprompt_block").css("display", "block");
|
$("#softprompt_block").css("display", "block");
|
||||||
$("#settings_perset").trigger("change");
|
|
||||||
}
|
}
|
||||||
if ($("#main_api").find(":selected").val() == "textgenerationwebui") {
|
if ($("#main_api").find(":selected").val() == "textgenerationwebui") {
|
||||||
$("#kobold_api").css("display", "none");
|
$("#kobold_api").css("display", "none");
|
||||||
@ -2126,13 +2128,8 @@ async function getSettings(type) {
|
|||||||
$("#amount_gen_block").css("opacity", 0.45);
|
$("#amount_gen_block").css("opacity", 0.45);
|
||||||
} else {
|
} else {
|
||||||
if (typeof koboldai_setting_names[preset_settings] !== "undefined") {
|
if (typeof koboldai_setting_names[preset_settings] !== "undefined") {
|
||||||
$(
|
$(`#settings_perset option[value=${koboldai_setting_names[preset_settings]}]`)
|
||||||
"#settings_perset option[value=" +
|
.attr("selected", "true");
|
||||||
koboldai_setting_names[preset_settings] +
|
|
||||||
"]"
|
|
||||||
)
|
|
||||||
.attr("selected", "true")
|
|
||||||
.trigger("change");
|
|
||||||
} else {
|
} else {
|
||||||
$("#range_block").children().prop("disabled", true);
|
$("#range_block").children().prop("disabled", true);
|
||||||
$("#range_block").css("opacity", 0.5);
|
$("#range_block").css("opacity", 0.5);
|
||||||
|
@ -191,10 +191,13 @@ function RA_checkOnlineStatus() {
|
|||||||
if (online_status !== undefined && online_status !== "no_connection") {
|
if (online_status !== undefined && online_status !== "no_connection") {
|
||||||
$("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message
|
$("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message
|
||||||
$("#send_form").css("background-color", "rgba(0,0,0,0.7)"); //on connect, form BG changes to transprent black
|
$("#send_form").css("background-color", "rgba(0,0,0,0.7)"); //on connect, form BG changes to transprent black
|
||||||
|
|
||||||
|
if (!is_send_press) {
|
||||||
$("#send_but").css("display", "inline"); //on connect, send button shows
|
$("#send_but").css("display", "inline"); //on connect, send button shows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Auto-connect to API (when set to kobold, API URL exists, and auto_connect is true)
|
//Auto-connect to API (when set to kobold, API URL exists, and auto_connect is true)
|
||||||
function RA_autoconnect() {
|
function RA_autoconnect() {
|
||||||
|
@ -251,6 +251,7 @@ code {
|
|||||||
background: url('img/load.svg') no-repeat;
|
background: url('img/load.svg') no-repeat;
|
||||||
background-size: 26px 26px;
|
background-size: 26px 26px;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
|
order: 99999;
|
||||||
}
|
}
|
||||||
|
|
||||||
#options_button {
|
#options_button {
|
||||||
|
Reference in New Issue
Block a user