From 8e0dd238103e0a5afbbb262db752f30ce32a9618 Mon Sep 17 00:00:00 2001 From: ebolam Date: Wed, 6 Jul 2022 15:37:40 -0400 Subject: [PATCH] Fix --- static/koboldai.css | 6 ++++++ static/koboldai.js | 23 +++++++++++++++++++++-- templates/index_new.html | 2 +- templates/story flyout.html | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/static/koboldai.css b/static/koboldai.css index c1e3ae42..a65a9bfd 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -68,6 +68,11 @@ font-family: verdana; position: relative; } + +.tabrow.nomenu_icon { + padding-left: 10px; +} + .tabrow span { cursor: pointer; -webkit-touch-callout: none; /* iOS Safari */ @@ -880,6 +885,7 @@ button.disabled { .force_center { margin-left: 50%; transform: translateX(-50%); + padding: 0px; } .flex { diff --git a/static/koboldai.js b/static/koboldai.js index aff31ca1..fcf2a116 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -76,10 +76,12 @@ function create_options(data) { if (document.getElementById("Select Options Chunk "+data.value.id)) { var option_chunk = document.getElementById("Select Options Chunk "+data.value.id) } else { - var option_area = document.getElementById("Select Options"); var option_chunk = document.createElement("div"); option_chunk.id = "Select Options Chunk "+data.value.id; - option_area.append(option_chunk); + if (current_chunk != data.value.id) { + option_chunk.classList.add("hidden"); + } + option_container.append(option_chunk); } //first, let's clear out our existing data while (option_chunk.firstChild) { @@ -319,6 +321,23 @@ function var_changed(data) { do_ai_busy(data); } + //Set all options before the next chunk to hidden + if ((data.classname == "actions") && (data.name == "Action Count")) { + var option_container = document.getElementById("Select Options"); + var current_chunk = parseInt(document.getElementById("action_count").textContent)+1; + console.log("Hide except for "+current_chunk); + var children = option_container.children; + for (var i = 0; i < children.length; i++) { + var chunk = children[i]; + if (chunk.id == "Select Options Chunk " + current_chunk) { + chunk.classList.remove("hidden"); + } else { + chunk.classList.add("hidden"); + } + } + } + + update_token_lengths(); } diff --git a/templates/index_new.html b/templates/index_new.html index 737e8b4a..17addcf4 100644 --- a/templates/index_new.html +++ b/templates/index_new.html @@ -50,7 +50,7 @@ - + diff --git a/templates/story flyout.html b/templates/story flyout.html index 7c346e75..c1b59bfe 100644 --- a/templates/story flyout.html +++ b/templates/story flyout.html @@ -19,7 +19,7 @@
Execution Time:
Remaining Time:

-
+
Memory Author's Note Notes