mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fixed bug with hidden range sliders
This commit is contained in:
@ -1805,6 +1805,7 @@ function openNavToggle() {
|
|||||||
|
|
||||||
function changeMainAPI() {
|
function changeMainAPI() {
|
||||||
const selectedVal = $("#main_api").val();
|
const selectedVal = $("#main_api").val();
|
||||||
|
console.log(selectedVal);
|
||||||
const apiElements = {
|
const apiElements = {
|
||||||
"kobold": {
|
"kobold": {
|
||||||
apiElem: $("#kobold_api"),
|
apiElem: $("#kobold_api"),
|
||||||
@ -1829,10 +1830,13 @@ function changeMainAPI() {
|
|||||||
for (const apiName in apiElements) {
|
for (const apiName in apiElements) {
|
||||||
const apiObj = apiElements[apiName];
|
const apiObj = apiElements[apiName];
|
||||||
const isCurrentApi = selectedVal === apiName;
|
const isCurrentApi = selectedVal === apiName;
|
||||||
|
console.log(isCurrentApi);
|
||||||
|
console.log(selectedVal);
|
||||||
apiObj.apiElem.css("display", isCurrentApi ? "block" : "none");
|
apiObj.apiElem.css("display", isCurrentApi ? "block" : "none");
|
||||||
apiObj.maxContextElem.css("display", isCurrentApi && apiName !== "novel" ? "block" : "none");
|
|
||||||
apiObj.amountGenElem.css("display", isCurrentApi && apiName !== "novel" ? "block" : "none");
|
if (isCurrentApi && apiName === "kobold") {
|
||||||
apiObj.softPromptElem.css("display", isCurrentApi && apiName !== "novel" ? "block" : "none");
|
$("#softprompt_block").css("display", "block");
|
||||||
|
}
|
||||||
|
|
||||||
if (isCurrentApi && apiName === "textgenerationwebui") {
|
if (isCurrentApi && apiName === "textgenerationwebui") {
|
||||||
apiObj.amountGenElem.children().prop("disabled", false);
|
apiObj.amountGenElem.children().prop("disabled", false);
|
||||||
|
Reference in New Issue
Block a user