mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for visual bug on retry leaving options on the screen.
This commit is contained in:
@@ -120,14 +120,11 @@ function create_options(data) {
|
|||||||
//Set all options before the next chunk to hidden
|
//Set all options before the next chunk to hidden
|
||||||
var option_container = document.getElementById("Select Options");
|
var option_container = document.getElementById("Select Options");
|
||||||
var current_chunk = parseInt(document.getElementById("action_count").textContent)+1;
|
var current_chunk = parseInt(document.getElementById("action_count").textContent)+1;
|
||||||
var children = option_container.children;
|
if (document.getElementById("Select Options Chunk " + current_chunk)) {
|
||||||
for (var i = 0; i < children.length; i++) {
|
document.getElementById("Select Options Chunk " + current_chunk).classList.remove("hidden")
|
||||||
var chunk = children[i];
|
}
|
||||||
if (chunk.id == "Select Options Chunk " + current_chunk) {
|
if (document.getElementById("Select Options Chunk " + (current_chunk-1))) {
|
||||||
chunk.classList.remove("hidden");
|
document.getElementById("Select Options Chunk " + (current_chunk-1)).classList.add("hidden")
|
||||||
} else {
|
|
||||||
chunk.classList.add("hidden");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementById("Select Options Chunk "+data.value.id)) {
|
if (document.getElementById("Select Options Chunk "+data.value.id)) {
|
||||||
@@ -410,6 +407,10 @@ function do_ai_busy(data) {
|
|||||||
if (data.value) {
|
if (data.value) {
|
||||||
ai_busy_start = Date.now();
|
ai_busy_start = Date.now();
|
||||||
favicon.start_swap()
|
favicon.start_swap()
|
||||||
|
current_chunk = parseInt(document.getElementById("action_count").textContent)+1;
|
||||||
|
if (document.getElementById("Select Options Chunk " + current_chunk)) {
|
||||||
|
document.getElementById("Select Options Chunk " + current_chunk).classList.add("hidden")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
runtime = Date.now() - ai_busy_start;
|
runtime = Date.now() - ai_busy_start;
|
||||||
if (document.getElementById("Execution Time")) {
|
if (document.getElementById("Execution Time")) {
|
||||||
|
Reference in New Issue
Block a user