mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Don't loop
This commit is contained in:
@@ -1858,8 +1858,6 @@ function world_info_entry(data) {
|
|||||||
const wiImgPlaceholder = wiImgContainer.querySelector(".placeholder");
|
const wiImgPlaceholder = wiImgContainer.querySelector(".placeholder");
|
||||||
const wiImgInput = $e("input", null, {type: "file", accept: "image/png,image/x-png,image/gif,image/jpeg"});
|
const wiImgInput = $e("input", null, {type: "file", accept: "image/png,image/x-png,image/gif,image/jpeg"});
|
||||||
|
|
||||||
console.log(data.image)
|
|
||||||
|
|
||||||
if (data.uid > -1) {
|
if (data.uid > -1) {
|
||||||
fetch(`/get_wi_image/${data.uid}`, {
|
fetch(`/get_wi_image/${data.uid}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
@@ -1900,7 +1898,11 @@ function world_info_entry(data) {
|
|||||||
wiTypeSelector.value = world_info_data[data.uid].type;
|
wiTypeSelector.value = world_info_data[data.uid].type;
|
||||||
wiTypeSelector.classList.remove("pulse");
|
wiTypeSelector.classList.remove("pulse");
|
||||||
wiTypeSelector.addEventListener("change", function(event) {
|
wiTypeSelector.addEventListener("change", function(event) {
|
||||||
console.log(event);
|
// If no change, don't do anything. Don't loop!!!
|
||||||
|
if (world_info_data[data.uid].type === wiTypeSelector.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (wiTypeSelector.value) {
|
switch (wiTypeSelector.value) {
|
||||||
case "Chat Character":
|
case "Chat Character":
|
||||||
world_info_data[data.uid].constant = true;
|
world_info_data[data.uid].constant = true;
|
||||||
@@ -6062,4 +6064,4 @@ function updateChatStyle() {
|
|||||||
const jQCM = $(".chat-message");
|
const jQCM = $(".chat-message");
|
||||||
if (jQCM.length) jQCM.remove();
|
if (jQCM.length) jQCM.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user