From c2bad577ea5673510c3670bbbe83da17243bdf16 Mon Sep 17 00:00:00 2001 From: RossAsscends <124905043+RossAscends@users.noreply.github.com> Date: Sat, 18 Mar 2023 08:06:38 +0900 Subject: [PATCH] fixed bug with hidden range sliders --- public/script.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/script.js b/public/script.js index 6c50ec663..714325de1 100644 --- a/public/script.js +++ b/public/script.js @@ -1805,6 +1805,7 @@ function openNavToggle() { function changeMainAPI() { const selectedVal = $("#main_api").val(); + console.log(selectedVal); const apiElements = { "kobold": { apiElem: $("#kobold_api"), @@ -1829,10 +1830,13 @@ function changeMainAPI() { for (const apiName in apiElements) { const apiObj = apiElements[apiName]; const isCurrentApi = selectedVal === apiName; + console.log(isCurrentApi); + console.log(selectedVal); 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"); - apiObj.softPromptElem.css("display", isCurrentApi && apiName !== "novel" ? "block" : "none"); + + if (isCurrentApi && apiName === "kobold") { + $("#softprompt_block").css("display", "block"); + } if (isCurrentApi && apiName === "textgenerationwebui") { apiObj.amountGenElem.children().prop("disabled", false);