From aa2dc61ad08525412ced17cc417e4d9f5e15d0d6 Mon Sep 17 00:00:00 2001 From: ebolam Date: Wed, 24 Aug 2022 13:50:09 -0400 Subject: [PATCH] Moved token bar --- gensettings.py | 16 ++++++++++++++ static/koboldai.css | 20 +++++++++++++++-- static/koboldai.js | 5 +++++ templates/settings flyout.html | 1 - templates/story flyout.html | 39 +++++++++++++++++----------------- templates/templates.html | 4 ++-- 6 files changed, 60 insertions(+), 25 deletions(-) diff --git a/gensettings.py b/gensettings.py index fad930b5..2462c13e 100644 --- a/gensettings.py +++ b/gensettings.py @@ -479,6 +479,22 @@ gensettingstf = [ "classname": "user", "name": "singleline" }, + { + "UI_V2_Only": True, + "uitype": "slider", + "unit": "int", + "label": "Insert Depth", + "id": "singleline", + "min": 0, + "max": 5, + "step": 1, + "default": 3, + "tooltip": "The Author's Note will be entered this many actions back from the end of the game text", + "menu_path": "author_notes", + "sub_path": "", + "classname": "story", + "name": "andepth" + }, ] gensettingsik =[{ diff --git a/static/koboldai.css b/static/koboldai.css index f9677fe3..b6cdbb56 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -165,6 +165,10 @@ input[type="range"]::-ms-fill-upper { width: 100%; background: var(--layer1_palette); grid-row: 2; + overflow-y: scroll; + overflow-x: hidden; + scrollbar-width: thin; + scrollbar-color: var(--scrollbar-color); } @@ -613,7 +617,7 @@ input[type="range"]::-ms-fill-upper { overflow-x: hidden; overflow-y: hidden; transition: 0.5s; - padding-top: 20px; + padding-top: 35px; border-radius: var(--radius_unpinned_menu) 0px 0px var(--radius_unpinned_menu); } @@ -634,7 +638,7 @@ input[type="range"]::-ms-fill-upper { .rightSideMenu .flyout_menu_contents { overflow-x: hidden; - overflow-y: auto; + overflow-y: hidden; height: calc(100vh - 70px); } @@ -689,6 +693,18 @@ td.server_vars { .story_category_area:not(#story_menu_wi){ margin: 10px 10px 0 10px; + overflow-y: scroll; + overflow-x: hidden; + scrollbar-width: thin; + scrollbar-color: var(--scrollbar-color); +} + +.story_category_area { + padding-bottom: 10px; + overflow-y: scroll; + overflow-x: hidden; + scrollbar-width: thin; + scrollbar-color: var(--scrollbar-color); } .token_breakdown { diff --git a/static/koboldai.js b/static/koboldai.js index 1cc3ffdf..5c8371bb 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -1789,6 +1789,11 @@ function send_world_info(uid) { } //--------------------------------------------General UI Functions------------------------------------ +function autoResize(element) { + element.style.height = 'auto'; + element.style.height = element.scrollHeight + 'px'; +} + function token_length(text) { return encode(text).length; } diff --git a/templates/settings flyout.html b/templates/settings flyout.html index 7ed636d7..095fe2f9 100644 --- a/templates/settings flyout.html +++ b/templates/settings flyout.html @@ -69,7 +69,6 @@ cloud_download file_download -
diff --git a/templates/story flyout.html b/templates/story flyout.html index 498fe75d..16e0639c 100644 --- a/templates/story flyout.html +++ b/templates/story flyout.html @@ -17,15 +17,6 @@ } -
-
-
-
-
-
-
-
-
Memory Author's Note @@ -39,7 +30,7 @@ Important information the AI should always keep in mind. - +
+
+
+
+
+
+
+
+
+
diff --git a/templates/templates.html b/templates/templates.html index bb71784b..727d26e7 100644 --- a/templates/templates.html +++ b/templates/templates.html @@ -35,7 +35,7 @@
Text: - +
Comment: - +